Reference Guide > TDV Support for SQL Operators > Comparison Operators
 
Comparison Operators
TDV supports the following comparison operators:
= (equal to)
<> (not equal to)
< (less than)
> (greater than)
<= (less than or equal to)
>= (greater than or equal to)
These operators are not available through the Studio interface, so you must manually type them into a query on a SQL or SQL Script panel.
If the value of the operand on either side of the comparison operator is NULL, the output of the logical comparison is also NULL. In the examples below, any row with a ProductID value of NULL does not return a result.
Example (Equal To)
SELECT ProductName, UnitPrice
FROM /shared/examples/ds_inventory/products products
WHERE ProductID = 5
Example (Not Equal To)
SELECT ProductName, UnitPrice
FROM /shared/examples/ds_inventory/products products
WHERE ProductID <> 10
Example (Less Than)
SELECT ProductName, UnitPrice
FROM /shared/examples/ds_inventory/products products
WHERE ProductID < 10
Example (Greater Than)
SELECT ProductName, UnitPrice
FROM /shared/examples/ds_inventory/products products
WHERE ProductID > 10
Example (Less Than Or Equal To)
SELECT ProductName, UnitPrice
FROM /shared/examples/ds_inventory/products products
WHERE ProductID <= 5
Example (Greater Than Or Equal To)
SELECT ProductName, UnitPrice
FROM /shared/examples/ds_inventory/products products
WHERE ProductID >= 5