!=和<>有什么区别?操作员?
问题描述:
我不喜欢不知道这一点,因为在某些情况下我需要使用一种而不是另一种。似乎在大多数情况下它们会产生相同的结果,但我猜测它们之间有细微的差别,也许与NULL值有关,或者像PHP中的extra =那样进行严格的比较。
I don;t like not knowing this as there may be situations when I need to use one instead of the other. It seems in most cases they produce the same results but I am taking a guess they have subtle difference, maybe to do with NULL values or one does strict comparisons like the extra = in PHP does.
谢谢
答
来自手册:
注意:!=运算符在解析器阶段转换为<>。不可能实现!=和<>运算符来执行不同的操作。
Note: The != operator is converted to <> in the parser stage. It is not possible to implement != and <> operators that do different things.
因此,没有,两者之间没有区别两个。
So no, there is no difference between the two.