Comparison Operators

The following operators are used to compare two values or two expressions. The not equal != or <> operator return true if the two values being compared are not equal else it returns false. The following query will output the value true.

SELECT (2+3) != (4 + 1.5)

The equal operator = returns true if the two values being compared are same if not it return false. The query below returns the value false.

SELECT (2+3) = (4 + 1.5)

The less than operator < returns true if the operand of left side is less than the operand on the right side of the operator. The value returned by this query is true. The less than operator can be combined with = operator so that if the value in the left side of the operator is less than or equal ...

Get Learning Google BigQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.