bboks.net™

MS SQL DateTime 비교 본문

Database/MS-SQL

MS SQL DateTime 비교

bboks.net 2010. 4. 2. 17:55
select * from table_name where condition_1
and
(cast(sd_date as smalldatetime) >=  cast('2006-05-02 00:00:01' as smalldatetime)
and
cast(sd_date as smalldatetime) <= cast('2006-05-02 23:59:59' as smalldatetime))

[출처] MS-SQL DateTime 크기 비교하기