Like operator,Order by,where clause
The SQL WHERE Clause
WHERE clause is used to extract only those records that fulfill a specified condition.
WHERE Syntax:
QUERY:
The SQL ORDER BY Keyword
ORDER BY Syntax
The SQL LIKE Operator
LIKE Syntax
WHERE clause is used to extract only those records that fulfill a specified condition.
WHERE Syntax:
SELECT column1, column2,
…
FROM table_name
WHERE condition;
FROM table_name
WHERE condition;
TABLE:
QUERY:
The SQL ORDER BY Keyword
The ORDER BY keyword
is used to sort the result-set in ascending or descending order.
ORDER BY Syntax
SELECT column1, column2,
…
FROM table_name
ORDER BY column1, column2, …;
FROM table_name
ORDER BY column1, column2, …;
The SQL LIKE Operator
The
LIKE operator is used in a WHERE clause to search for a specified pattern in a
column.
There
are two wildcards used in conjunction with the LIKE operator:
·
% – The percent sign represents zero, one, or multiple characters
·
_ – The underscore represents a single character
LIKE Syntax
SELECT column1,
column2, …
FROM table_name
WHERE columnN LIKE pattern;
FROM table_name
WHERE columnN LIKE pattern;
No comments