sql as syntax code example

Example 1: sql as

SELECT CustomerID AS ID, CustomerName AS Customer

Example 2: sql as

-- AS is a keyword that allows you to rename a column or table using an alias
SELECT column_name AS 'Alias'
FROM table_name;

Example 3: sql syntax

select [all/distinct] <COL1>, <COL2>, <COL3>
from <TABLE_NAME>
[join <JOIN_CONDITION>]
[where <CONDITION>]
[group by <COLUMN_NAME>]
[having <SEARCH_CONDITION>]
[order by <SORT_SPECIFICATION>]


/*
Specifically for SQL -> Oracle

LEGEND: 
[...]   :   optional entries
<...>   :   your specific entry
*/

Tags:

Sql Example