Comparison operators compare one expression to another. The result of such a comparison can be TRUE, FALSE, or UNKNOWN (if one of the operands is NULL). The Salesforce driver considers the UNKNOWN result as FALSE. The following table lists the supported comparison operators.
Table 7: SELECT * FROM emp WHERE job IN ('CLERK','ANALYST')SELECT * FROM emp WHERE sal IN (SELECT sal FROM emp WHERE deptno = 30) "Greater than or equal to x" and "less than or equal to y." SELECT * FROM emp WHERE sal BETWEEN 2000 AND 3000 Tests for existence of rows in a subquery. SELECT empno, ename, deptno FROM emp e WHERE EXISTS (SELECT deptno FROM dept WHERE e.deptno = dept.deptno) Tests whether the value of the column or expression is NULL. ESCAPE clause in LIKE operatorLIKE ’pattern string’ ESCAPE ’c’ The Escape clause is supported in the LIKE predicate to indicate the escape character. Escape characters are used in the pattern string to indicate that any wildcard character that is after the escape character in the pattern string should be treated as a regular character.The default escape character is backslash (\). SELECT * FROM emp WHERE ENAME LIKE 'J%\_%' ESCAPE '\'SELECT * FROM emp WHERE ENAME LIKE 'JOE\_JOHN' ESCAPE '\'This matches only records with name ’JOE_JOHN’.
| © 2012 Progress Software Corporation and/or its subsidiaries or affiliates. |