@Daniel-Loyer,
The AS
is used to rename a column or table with an alias. The alias is only good for that query.
For example, you "might" have a table called "Customers", a descriptive good name. I might choose to alias that with AS to c
and "Orders" to o
.
SELECT o.OrderID, o.OrderDate, c.CustomerName
FROM Customers AS c, Orders AS o
WHERE c.CustomerName="Around the Horn" AND c.CustomerID=o.CustomerID;
It's in the SELECT
and in the WHERE
statements that we see the use of the AS effectively. We no longer have to type the whole unambiguous name of tablename.fieldname
There is another command for ascending order
which is ASC
.
Hope that helps!