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.
可能重复: 当没有条件时,如何使查询不返回任何内容?
如果我有一个查询,我不希望在没有提供任何 WHERE 子句信息的情况下返回任何结果。
简而言之,如何使查询不贪婪?
我认为这对你有用:
SELECT * FROM Table WHERE 1=0 OR (some other criteria)