How do I compare two columns for equality in SQL Server?

后端 未结 7 1021
忘掉有多难
忘掉有多难 2020-12-06 04:15

I have two columns that are joined together on certain criteria, but I would also like to check if two other columns are identical and then return a bit field if they are.

相关标签:
7条回答
  • 2020-12-06 04:43

    I'd go with the CASE WHEN also.

    Depending on what you actually want to do, there may be other options though, like using an outer join or whatever, but that doesn't seem to be what you need in this case.

    0 讨论(0)
提交回复
热议问题