Let Fq be a finite field of odd order q. In this note, the generator polynomials and the numbers of all self-dual and self-orthogonal cyclic and negacyclic codes of length 2m over Fq are precisely characterized.