标签: sql sql-server date
:
Where (u.xdate BETWEEN N'" + startdate + "' AND N'" + enddate + "')
如果我使用:
startdate = 2014-04-20 enddate = 2014-05-05 and the xdate 2014-05-01
结果回来了...... ??? 是sql server会考虑代码是日期吗?
注意:xdate是nvarchar - startdate,enddate是字符串