sql - <> 和 != 之间的区别

标签 sql sql-server oracle

Possible Duplicate:
Oracle <> , != , ^= operators

在sql中,<>有什么区别和!= ,我们可以将两者都用于“NOt Equal to”。

他们之间有什么区别吗?
例如。

select * from student where no != 2;

&

select * from student where no <> 2;

使用一种替代另一种有什么好处吗?

造成这种情况的主要因素有哪些!=不是按照 ISO 标准制定的

最佳答案

对于 SQL Server:

它们是相同的。两者都是两个不等于运算符。但 != 不是 ISO 标准,引用自 Comparison Operators :

<> (Not Equal To) Not equal to

!= (Not Equal To) Not equal to (not ISO standard)

关于sql - <> 和 != 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13740732/

相关文章:

不返回具有多个条目的 id 的 mysql 查询

sql - 同时使用 RANK 和 COUNT(DISTINCT) 聚合

sql-server - SQL Server 触发器问题

sql - Oracle截断父表约束错误

java - ORA-00936 导致的 "Procedure created with compilation error"

oracle - 从 ado.net 调用 Oracle 存储函数并获取结果的正确方法是什么?

SQL Server : +(unary) operator on non-numeric Strings

php - 带有非空变量的 where 子句

sql - REST API体系结构: How to Represent Joined Tables

sql - 引用非主键列的外键约束有什么缺点?