Skip to Content

SELECT, WHERE and ORDER BY

SELECT name, list_price
FROM product
WHERE list_price BETWEEN 100 AND 500
  AND name ILIKE '%router%'
  AND active
ORDER BY list_price DESC
LIMIT 20;
  • =, <>, <, >, BETWEEN, IN (...), LIKE / ILIKE (case-insensitive in PostgreSQL)
  • IS NULL / IS NOT NULL — never = NULL
  • DISTINCT removes duplicate rows
Rating
0 0

There are no comments for now.

to be the first to leave a comment.