PostgreSQL
PostgreSQL Operators
Use operators to compare values, combine conditions, calculate values, and match patterns.
Comparison operators
Comparison operators return true or false. Common operators include =, <>, >, <, >=, and <=.
SELECT * FROM products
WHERE year >= 2025;Logical and arithmetic operators
SELECT * FROM products
WHERE year >= 2024 AND name <> 'Laptop';
SELECT year + 1 AS next_year
FROM products;Use AND, OR, and NOT to combine conditions. Parentheses make complex conditions clear.