Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在 SQL 中使用“日期”,但我显然做错了什么。建议?
SELECT Name, ID, Town FROM Participants p, Towns t WHERE t.Date < '2012-05-19';
我想要的答案是今天或更早日期(来自另一个表)所在的名称、ID 和城镇。
您还没有加入您的表格,并且您的数据库可能将日期一词作为关键字?如果是这种情况,请尝试:
WHERE t.[Date] < '2012-05-09'