Testing for inequality in T-SQL

前端 未结 4 1028
悲哀的现实
悲哀的现实 2020-11-30 08:49

I\'ve just come across this in a WHERE clause:

AND NOT (t.id = @id)

How does this compare with:

AND t.id != @id
         


        
4条回答
  •  甜味超标
    2020-11-30 09:06

    Note that the != operator is not standard SQL. If you want your code to be portable (that is, if you care), use <> instead.

提交回复
热议问题