asc in sql code example

Example 1: sql asc

Used with ORDER BY to return the data in ascending order.
Example: Apples, Bananas, Peaches, Raddish

Example 2: order by sql

//this_for_descending_order.. 
 SELECT * FROM TableName ORDER BY columnName DESC;
 // this_for_ascending_order..
SELECT * FROM TableName ORDER BY columnName ASC;

Example 3: sql as

SELECT CustomerID AS ID, CustomerName AS Customer

Example 4: 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;

Tags:

Sql Example