PostgreSQL Operators

Operators Description Example
IS NULL | IS NOT NULL This is to filter the records which have(does not have) a NULL value for a given column Select * FROM STUDENT
LIMIT This is used to display only a subset of records obtained by the query. Select * FROM STUDENT LIMIT 5
OFFSET This operator is used along with the LIMIT to skip certain number of records from a result set. Select AGE FROM STUDENT
Mathematical Operators like =, <=, >=, <, >, != These are various mathematical operators used to give conditions in where clause Select * FROM STUDENT WHERE AGE>20
AND All the condition merged using AND should be satisfied Select * FROM STUDENT WHERE AGE>20 AND ID>3
OR Either one of the conditions merged using OR must be satisfied Select * FROM STUDENT WHERE AGE>20 OR ID>3
IN | NOT IN This operator is used to check if a value matches(or not matches) any value in a list of value. Select * FROM STUDENT WHERE ID IN (1, 2, 3)
BETWEEN This is used to match a value against a given range of values.Even the boundaries are included. Select * FROM STUDENT WHERE ID BETWEEN 1 AND 3
LIKE This operator is used for pattern matching. Select * FROM STUDENT WHERE NAME LIKE 'A%'
ILIKE This operator ignores the case while doing the pattern matching. Select * FROM STUDENT WHERE NAME ILIKE 'A%'




Visit :


Discussion



* You must be logged in to add comment.