Professional Documents
Culture Documents
Jose Pérez García Chuletari
Jose Pérez García Chuletari
FROM table_name
WHERE CustomerID=1;
= Equal
Between – shearch values “entre” \like search specific pattern \in multiply values for
column
w here not ci
='
berlin
';
FROM table_name
WHERE condition;
FROM table_name
WHERE condition;
SELECT SUM(column_name) - returns the total sum of a numeric column. FROM table_name
WHERE condition;
SELECT column1, column2, ... FROM table_name WHERE columnN LIKE pattern;
The INNER JOIN keyword selects records that have matching values in both tables.
The LEFT JOIN keyword returns all records from the left table (table1), and the matched
records from the right table (table2). The result is NULL from the right side, if there is no
match.
SELECT column_name(s) FROM table1 INNER JOIN table2 \ LEFT JOIN table2 \ RIGHT JOIN
table2 ON table1.column_name = table2.column_name;
The ANY and ALL operators are used with a WHERE or HAVING clause.
The ANY operator returns true if any of the subquery values meet the condition.
The ALL operator returns true if all of the subquery values meet the condition.
FROM table_name
ORDER BY Country;
SELECT column_names
FROM table_name