sql判断值为null:SQL 空值NULL 判断办法



create database test
go
use test
go
create table test123
(
id ,
word varchar(50),
)
go
insert o test123 (id,word)values(1,'1')
insert o test123 (id,word)values(2,'2')
insert o test123 (id,word)values(3,'3')
insert o test123 (id,word)values(4,'4')
insert o test123 (id)values(6)
insert o test123 (id)values(7)
insert o test123 (id)values(8)
insert o test123 (id)values(9)
insert o test123 (word)values('10')

select * from test123

select * from test123 where id is null
select * from test123 where id is not null

select * from test123 where word is null
select * from test123 where word is not null
Tags:  sql判断为空 空值null sql空值判断 sql判断值为null

延伸阅读

最新评论

发表评论