当前位置:Gxlcms > 数据库问题 > mysql5.7基础 select...where...is not null 查找不为NULL的内容

mysql5.7基础 select...where...is not null 查找不为NULL的内容

时间:2021-07-01 10:21:17 帮助过:33人阅读

礼悟:
     公恒学思合行悟,尊师重道存感恩。叶见寻根三返一,江河湖海同一体。
          虚怀若谷良心主,愿行无悔给最苦。读书锻炼养身心,诚劝且行且珍惜。


 

 

  数据、数据,命根就在数据。操作数据库一定要谨慎小心。给最苦 这里的代码,看看就好,要有自己的判断。遇到抉择,要不耻上下问。 
               mysql:5.7
                     os:Windows7 x64

 

 

代码及效果

mysql> select * from t1;
+------+-------+
| id   | name  |
+------+-------+
|    4 | Hello |
|    2 | World |
| NULL | nihao |
|    3 | nihao |
|  100 | nihao |
+------+-------+
5 rows in set (0.00 sec)


mysql> select * from t1 where id is not null;
+------+-------+
| id   | name  |
+------+-------+
|    4 | Hello |
|    2 | World |
|    3 | nihao |
|  100 | nihao |
+------+-------+
4 rows in set (0.00 sec)

mysql>

   

  


mysql,关系型数据库管理系统,优秀,值得学习。
学习资源:itcast和itheima视频库 + 清净的心地。
如果您有公开的资源,可以分享给我的话,用您的资源学习也可以。
博文是观看视频后,融入思考写成的。博文好,是老师讲得好。博文坏,是 给最苦 没认真。

mysql5.7基础 select...where...is not null 查找不为NULL的内容

标签:优秀   数据库管理   nihao   ima   ...   select   null   name   基础   

人气教程排行