Is it possible to use LIKE and IN for a WHERE statment?

后端 未结 4 1688
后悔当初
后悔当初 2020-12-06 17:47

I have a list of place names and would like to match them to records in a sql database the problem is the properties have reference numbers after there name. eg. \'Ballymena

4条回答
  •  佛祖请我去吃肉
    2020-12-06 18:02

    No, but you can use OR instead:

    WHERE (dbo.[Places].[Name] LIKE 'Ballymena%' OR
           dbo.[Places].[Name] LIKE 'Banger%')
    

提交回复
热议问题