Comparative studies have been made between the variations of the ionospheric total electron content (TEC) and the variation of the maximum electron density of F2 layer (NmF2) over China, based on observations from 34 GPS/TEC sites and 10 ionosonde stations in 2004. The variations of TEC are mainly similar to that of NmF2, such as a clear single-peak structure in the diurnal variation with the peak time in the afternoon, a common "semi-annual anomaly" in the season variation, similar latitude and longitude variations, and so on. On the other hand, there are some differences. The peak time in the diurnal variation of NmF2 is usually about 1 or 2 hours later than that of TEC. This is possible attributed to the westward electric field in F2 layer in the afternoon, which causes the E×B driven downward plasma movement from the plasmasphere and enhance the electron density in F2 layer. The other difference is that there is no obvious "winter anomaly" in TEC variation, but still exist for NmF2 in China area.