SELECT cast(convert(char(10),getdate(),120)+' 00:00:00' as datetime)--取0点
SELECT cast(convert(char(10),getdate(),120)+' 23:59:59' as datetime)--取24点
整合
SELECT * FROM MS_YJ01 where KDRQ between cast(convert(char(10),getdate(),120)+' 00:00:00' as datetime) and cast(convert(char(10),getdate(),120)+' 23:59:59' as datetime) ;