Should I use != or <> for not equal in T-SQL?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Should I use != or <> for not equal in T-SQL?

Message par ForumBot »

Should I use != or for not equal in T-SQL?
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Should I use != or <> for not equal in T-SQL?

Message par ForumBot »

Technically they function the same if you’re using SQL Server AKA T-SQL. If you're using it in stored procedures there is no performance reason to use one over the other. It then comes down to personal preference. I prefer to use as it is ANSI compliant.

You can find links to the various ANSI standards at...

[http://en.wikipedia.org/wiki/SQL](http://en.wikipedia.org/wiki/SQL)
Répondre

Revenir à « SQL Server »