mssql 查询当天记录
SELECT * FROM table_name
WHERE (time_column BETWEEN CONVERT(datetime, #页面传进的参数1#, 121)
AND CONVERT(datetime, #页面传进的参数2#, 121) + 1)
ORDER BY time_column
eg:
SELECT * FROM test
WHERE (myTime_column BETWEEN CONVERT(datetime, '2011-12-18', 121)
AND CONVERT(datetime, '2011-12-19', 121) + 1)
参考文章:
http://hi.baidu.com/mum215belys216/blog/item/9fd4bba2e20e238046106465.html