Welcome to Database Laboratory A. Y. 2025- 26
Welcome to Database Laboratory A. Y. 2025- 26
Used to compare values.
Used to combine multiple conditions.
Example:
WHERE salary NOT BETWEEN 30000 AND 60000
Example:
WHERE department_id NOT IN (1, 2, 3) // Meaning: Select records where department_id is NOT 1, 2, or 3.
Similar to:
WHERE department_id <> 1
AND department_id <> 2
AND department_id <> 3
Wildcards used with LIKE:
Example:
Starts with 'A'
Ends with 'A'
Contains 'A' anywhere
Second letter is 'A'
Exactly 5 characters
Does not start with 'A'
Does not contain 'A'
Example:
Used with subqueries.
Example:
Some databases support:
Example:
+, -, *, /, %