How to compare if two strings contain the same words in T-SQL for SQL Server 2008?

前端 未结 8 1143
长情又很酷
长情又很酷 2021-01-18 05:22

When I compare two strings in SQL Server, there are couple of simple ways with = or LIKE.

I want to redefine equality as:

If

8条回答
  •  粉色の甜心
    2021-01-18 06:02

    You can add a precomputed column in the base table that is evaluated in INSERT/UPDATE trigger (or UDF default) that splits, sorts and then concatenates words from the original column.

    Then use = to compare these precomputed columns.

提交回复
热议问题