我的桌子上有这个记录
Name UserName Password DateAdded
skype someusername somepassword 05/06/2012 01:18:50
我正在尝试执行此语句,但它总是失败。
一些尝试:(全部失败)
Select * from Passwords where DateAdded = '05/06/2012 01:18:50'
Select * from Passwords where DateAdded = #05/06/2012 01:18:50#
Select * from Passwords where DateAdded = '06/05/2012 01:18:50'
Select * from Passwords where DateAdded = '2012/06/05 01:18:50'
Select * from Passwords where DateAdded = '2012/05/06 01:18:50'
Select * from Passwords where DateAdded like '2012/06/05 01:18:50'
我数据库中的列DateAdded
是 typedatetime
而不是nvchar
.
我是 SQL 新手,这个查询有什么问题?