mysql数据库操作之查找需要补考的学生案例
语法代码:mysql> select * from stu where ch<60 or math<60 or ch is null or math is null;
代码运行结果如下:
- +--------+----------+--------+--------+---------+------------+------+------+
- | stuNo | stuName | stuSex | stuAge | stuSeat | stuAddress | ch | math |
- +--------+----------+--------+--------+---------+------------+------+------+
- | s25301 | 张秋丽 | 男 | 18 | 1 | 北京 | 80 | NULL |
- | s25303 | 李斯文 | 女 | 22 | 2 | 北京 | 55 | 82 |
- | s25304 | 欧阳俊雄 | 男 | 28 | 4 | 天津 | NULL | 74 |
- | s25305 | 诸葛丽丽 | 女 | 23 | 7 | 河南 | 72 | 56 |
- +--------+----------+--------+--------+---------+------------+------+------+
- 4 rows in set (0.00 sec)
复制代码
|
|