1、不爲空 Select * From table_name Where id<>'' Select * From table_name Where id!='' 2、爲空 Select * From table_name Where id='' Select * From table_name Where ISNULL(id) 具體狀況具體分析,若是字段是char和varchar型用 id=''能夠;若是是int型用 ISNULL好些