06数据查询

一、is null 和 is not null(查询字段的值为null)

当查询字段的值为null时,使用is null 反之则使用is not null。

查看没有XXX的YYY的信息

select * from XXX wher YYY is null

查看有XXX的YYY的信息

select * from XXX wher YYY is not null

2.去重distinct

查询某表中出现的不同XXX

select distinct XXX from 表名;

查询某表中出现的重复属性,并去掉重复

select distinct 重复属性名 from 表名;

 

posted @ 2020-11-09 15:57  print("hello~world")  阅读(94)  评论(0)    收藏  举报