SELECTING with multiple WHERE conditions on same column

后端 未结 12 1089
南旧
南旧 2020-11-22 07:00

Ok, I think I might be overlooking something obvious/simple here... but I need to write a query that returns only records that match multiple criteria on the same column...<

12条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 07:32

    Sometimes you can't see the wood for the trees :)

    Your original SQL ..

    SELECT contactid 
     WHERE flag = 'Volunteer' 
       AND flag = 'Uploaded'...
    

    Should be:

    SELECT contactid 
     WHERE flag = 'Volunteer' 
       OR flag = 'Uploaded'...
    

提交回复
热议问题