查找除了无成绩的学生的所有信息

来源:百度知道 编辑:UC知道 时间:2024/07/04 12:57:13
表为 sc 字段为 grade
为什么我这样写 实现不了效果
select * from sc where grade=''
select * from sc where grade=null

select * from sc where grade is null
第一个之所以不行的原因是grade不是字符型数据
第二个是你语法错,不能这样写

select * from sc where grade is nul

如果成绩不是字符型的
select * from sc where isnull(grade,-1)<>-1

select * from sc where grade is not null