简体   繁体   English

mysql 中的 '!=' 和 '<>' 有什么区别

[英]whats the difference between '!=' and '<>' in mysql

whats the difference between != and <> in mysql. mysql 中的!=<>有什么区别。 which symbol is good to user in sql query for not equal condition.can someone tell me whats the pros and cons of using the not equal symbol in mysql.哪个符号对 sql 查询不相等条件的用户有好处。有人可以告诉我在 mysql 中使用不相等符号的优缺点是什么。

!= requires 3 keystrokes (Shift, ,, =), and <> requires 3 keystrokes (Shift, <, >). !=需要 3 次击键(Shift、,、=),而<>需要 3 次击键(Shift、<、>)。 However a touch typist has to switch hands to hit that = .然而,触摸打字员必须换手才能击中那个=

You should definitely use <> over != .您绝对应该使用<>而不是!= You'll save at least 10 milliseconds of typing for each use.每次使用至少可以节省 10 毫秒的打字时间。

There is absolutely no difference in MySQL, but the <> is the variant present in the SQL ISO standard. MySQL 完全没有区别,但<>是 SQL ISO 标准中存在的变体。

If you're interested in trivia I can tell you that Oracle also has ^= apart from those two.如果您对琐事感兴趣,我可以告诉您 Oracle 除了这两个之外还有^=

There is no difference.没有区别。 According to SQL.org, the.= operator is converted to be <> by the compiler/interpreter during execution so in essence it is just an alias.根据 SQL.org,.= 运算符在执行期间由编译器/解释器转换为 <>,因此本质上它只是一个别名。

http://www.sql.org/sql-database/postgresql/manual/functions-comparison.html http://www.sql.org/sql-database/postgresql/manual/functions-comparison.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM