a b c d
980515 I˾ Һ NULL
980514 ȫľI˾ NULL 123
980514 Ѹ|Ƽɷ˾ 꿣 NULL
980515 }ԽHI˾ NULL 111
ṹʾҪѯCΪյļ¼ģӣѣ䲻select * from table where c=null; select * from table where c=; Ӧ select * from table where c is null; ෴ҪѯΪյӦ select * from talbe where c<>; select * from table where c is not null; ע⣺not is nullŶ
زڵSQLȫ
1.ʾµһ SELECTDATEADD(mm,DATEDIFF(mm,0,getdate()),0) selectconvert(datetime,convert(varchar(8),getdate(), 120)+01,120) 2.ʾһ selectdateadd(day,-1,convert(datetime,convert (varchar(8),dateadd(month,1,getdate()),120