gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 06:35:25 24 4
gpt4 key购买 nike

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com