[英]What does <=> operator mean, sql?
I came accross the sql query where the <=>
operator is put. 我遇到了放置
<=>
运算符的sql查询。 What does <=> operator mean? <=>运算符是什么意思?
SELECT STR_ID, TEX_TEXT AS STR_DES_TEXT, IF( EXISTS( SELECT * FROM SEARCH_TREE AS SEARCH_TREE2 WHERE SEARCH_TREE2.STR_ID_PARENT <=> SEARCH_TREE.STR_ID LIMIT 1 ), 1, 0) AS DESCENDANTS FROM SEARCH_TREE
This sql is of MySQL type. 此sql为MySQL类型。
When in doubt, read the documentation : 如有疑问,请阅读文档 :
<=> is a NULL-safe equal.
<=>是NULL安全等于。 This operator performs an equality comparison like the = operator, but returns 1 rather than NULL if both operands are NULL, and 0 rather than NULL if one operand is NULL.
该运算符执行与=运算符类似的相等比较,但是如果两个操作数均为NULL,则返回1而不是NULL,如果一个操作数为NULL,则返回0而不是NULL。
Null safe equal operator,it returns 1 if boths operands are null. 空安全相等运算符,如果两个操作数均为空,则返回1。
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_equal-to http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_equal-to
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.