SQL222
SQL222
1. SELECT DISTINCT:
2. WHERE
BETWEEN
SELECT * FROM Products
WHERE Price BETWEEN 50 AND 60;
50 and 60 will be included in the output
LIKE
SELECT * FROM Customers
WHERE City LIKE 's%';
% means 0 or many character , ‘_’ means one character
NOT LIKE is also used
IN
SELECT * FROM Customers
WHERE City IN ('Paris','London');
Only () bracket is valid.
NOT IN, NOT LIKE ‘xyx%’ IN (x,y,x)
3. ORDER BY:
SELECT *
FROM Customers
WHERE Country = 'Spain' AND/OR CustomerName NOT LIKE /LIKE 'G%';
5. INSERT INTO
OR