热线电话:13121318867

登录
2019-02-22 阅读量: 673
SQL查询

问题描述:

有一张表:t_student
字段:
id
name
age
status (0,1,2,3,4,5,6)
teacher_id

如果teacher_id是空,就不查询status=0
这种SQL语句怎么写?

解决方法:

select * from t_student where teacher_id='' and status!=0;

0.0000
2
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子