In this paper, we study n -dimensional complete submanifolds with constant scalar curvature in the Euclidean space E n+p and n -dimensional compact submanifolds with constant scalar curvature in the unit sphere S n+p (1). We prove that the totally umbilical sphere S n ( r ), totally geodesic Euclidean space E n and generalized cylinder S n−1 ( c ) × E 1 are the only n -dimensional ( n > 2) complete submanifolds M n with constant scalar curvature n ( n − 1) r in the Euclidean space E n+p , which satisfy the following condition: where S denotes the squared norm of the second fundamental form of M n . For compact submanifolds with constant scalar curvature in the unit sphere S n+p (1), we also obtain a corresponding result (see theorem 1.3).