在MYSQL数据库中查询某个字段不为空,下列哪个语法是正确的()
A: SELECT*FROMworkWHEREinfoisnotNULL
B: SELECT*FROMworkWHEREinfo==NULL;
C: SELECT*FROMworkWHEREinfo=NULL;
D: SELECT*FROMworkWHEREinfoISNULL;
A: SELECT*FROMworkWHEREinfoisnotNULL
B: SELECT*FROMworkWHEREinfo==NULL;
C: SELECT*FROMworkWHEREinfo=NULL;
D: SELECT*FROMworkWHEREinfoISNULL;
举一反三
- 若查询考试成绩不为空的学生的学号,下列语句哪个是正确的?( ) A: SELECT Sno FROM SC WHERE Grade >= 0; B: SELECT Sno FROM SC WHERE Grade != 0; C: SELECT Sno FROM SC WHERE Grade IS NOT NULL; D: SELECT Sno FROM SC WHERE Grade NOT IS NULL;
- 若查询考试成绩不为空的学生的学号,下列语句哪个是正确的? A: SELECT Sno FROM SC WHERE Grade >= 0; B: SELECT Sno FROM SC WHERE Grade!= 0; C: SELECT Sno FROM SC WHERE Grade NOT IS NULL; D: SELECT Sno FROM SC WHERE Grade IS NOT NULL;
- 若想查询student表中name为空值的记录,则正确的SQL语句是( )。 A: SELECT * FROM student WHERE name = NULL; B: SELECT * FROM student WHERE name like NULL; C: SELECT * FROM student WHERE name = 'NULL'; D: SELECT * FROM student WHERE name is NULL;
- 若想查询student表中name为空值的记录,则正确的SQL语句是(1.0分) A: select * from student where name = null; B: select * from student where name link null; C: select * from student where name = 'null'; D: select * from student where name is null;
- 查询student表中的所有非空email信息, 以下语句正确的是( ) A: Select email from student where email !=null B: Select email from student where email not is null C: Select email from student where email <> null D: Select email from student where email is not null