Compare Columns Where One is Similar to Part of Another

后端 未结 7 1378
再見小時候
再見小時候 2020-12-05 07:35

I\'m trying to write a Select statement where I can see if one column is like part of another.

tblNames 
ID    FullName                   FirstName
1     Mr.         


        
7条回答
  •  借酒劲吻你
    2020-12-05 07:43

    It looks OK, except you probably want to switch the order around in your where:

    WHERE Fullname not like '%' + FirstName + '%'
    

提交回复
热议问题