Select … where … OR

后端 未结 7 1174
误落风尘
误落风尘 2021-02-05 09:09

Is there a way to select data where any one of multiple conditions occur on the same field?

Example: I would typically write a statement such as:

select          


        
7条回答
  •  悲哀的现实
    2021-02-05 09:32

    You can still use in for

    select *
    from table
    where field  = '1' or field = '2' or field = '3'
    

    its just

    select * from table where field in ('1','2','3')
    

提交回复
热议问题