Access SQL - II
SELECT {* | expression1 [AS alias1][, expression2 [AS alias2][,..]]]}
SELECT [Customer#], LastName, FirstName
FROM table-or-query [AS alias]
Example: SELECT * from tblOrder;
SELECT OrderId, OrderDate FROM tblOrder as [Orders Table];
WHERE expression1 [{And | Or} expression2[..]]
Example: SELECT OrderId FROM tblOrder WHERE OderTakerId = 2;
SELECT OrderId, OrderDate FROM tblOrder WHERE Sex="Female" AND Age BETWEEN 21 AND 29;
Syntax of ORDER BY clause:
ORDER BY column1 [{ASC | DESC}][,column2[{ASC | DESC}][,..]]
Example: SELECT * FROM tblCustomer ORDER BY LastName, FirstName;