1(NOT) operator excluding given
2For example:
3Select last_name, job_id From Employees
4Where "Not" job_id = 'ABC';
5
1Used alongside a WHERE clause as a shorthand for multiple OR conditions.
2So instead of:
3SELECT * FROM users
4WHERE country = 'USA' OR country = 'United Kingdom' OR
5country = 'Russia' OR country = 'Australia';
6You can use:
7SELECT * FROM users
8WHERE country IN ('USA', 'United Kingdom', 'Russia',
9'Australia');
1/* AND is a operator that allows you to combine two conditions
2Both conditions must be true for the row to b e included in the result set */
3SELECT column_name(s)
4FROM table_name
5WHERE column_1 = value_1
6AND column_2 = value_2;
1Returns true if a record DOESN’T meet the condition.
2Example: Returns true if the user’s first_name doesn’t end with ‘son’.
3SELECT * FROM users
4WHERE first_name NOT LIKE '%son';
1(NOT) operator excluding given
2For example:
3Select last_name, job_id From Employees
4Where "Not" job_id = 'ABC';