<>和有什么区别?和!=运算符在MySQL中? [英] What is the difference between <> and != operators in MySQL?
本文介绍了<>和有什么区别?和!=运算符在MySQL中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
我应该使用!=或<>是否在TSQL中不相等?
Possible Duplicate:
Should I use != or <> for not equal in TSQL?
如果我使用一个简单的表,例如:
If I use a simple table such as :
create table test ( a int );
insert into test values ( 1 ) , ( 2 ) , ( 2 ) , ( 3 );
select * from test where a <> 2;
select * from test where a != 2;
两个都给我:
+------+
| a |
+------+
| 1 |
| 3 |
+------+
2 rows in set (0.00 sec)
那么<>
和!=
mysql操作符之间有什么区别?
So what is the difference between <>
and !=
mysql operators ?
推荐答案
它们完全相同.请参阅文档.
They are both exactly the same. See the documentation.
http://dev.mysql. com/doc/refman/5.0/en/comparison-operators.html#operator_not-equal
这篇关于<>和有什么区别?和!=运算符在MySQL中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文