SQL: Join tables on substrings

前端 未结 5 749
北海茫月
北海茫月 2020-12-11 05:56

I have a table A with the string-column a and a table B with the string-column b. a is a substring of b.

5条回答
  •  抹茶落季
    2020-12-11 06:51

    You have the contains function: http://msdn.microsoft.com/en-us/library/ms187787.aspx

    select * from A,B where contains(B.b, A.a)
    

提交回复
热议问题