(不等于)和!=(不等于)运算符之间的区别是什么? [英] What's the difference between (not equal) and !=(not equal) operator?

查看:237
本文介绍了(不等于)和!=(不等于)运算符之间的区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们在sql server中使用运算符where子句时,那么使用不等运算符的最佳方法是什么(<> OR!=)

When we use operators with where clause in sql server then what's the best way to use not equal operators(<> OR !=)

推荐答案

< a href =http://stackoverflow.com/questions/723195/should-i-use-or-for-not-equal-in-tsql>应该使用或者不等于-tsql [ ^ ]



希望它能澄清..
should-i-use-or-for-not-equal-in-tsql[^]

Hope it will clarify..


性能明智没有区别,所以它主要是风格问题。

但是,Access 2010只支持<>而不是!=所以为了兼容性,最好避免使用!=。



但是......我使用!=因为我发现它更具可读性,并且与我使用的编程语言一致并且习惯于阅读。



由您决定:只要您选择一个并坚持下去,您就没事了。
Performance wise there is no difference, so it's largely a matter of style.
However, Access 2010 only supports "<>", not "!=" so for compatability, it would be better to avoid "!=".

But...I use "!=" because I find it more readable, and consistent with teh programming languages I use and am used to reading.

Up to you: as long as you pick one and stick with it, you will be fine.


这篇关于(不等于)和!=(不等于)运算符之间的区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆