multiple search condition sql

雨燕双飞 提交于 2019-12-11 05:15:04

问题


Is it possible to achieve something like this in sql?

ID!= {2,3}

where ID is a column. Or I have to use multiple OR statements?


回答1:


yes, not in:

ID not in (2,3)

You can read more here.




回答2:


You have to try With

ID NOT IN (2,3)

Or

ID <> 2 or ID <> 3


来源:https://stackoverflow.com/questions/10341394/multiple-search-condition-sql

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!