Basic HTML version of Foils prepared April 15 1997

Foil 26 Access SQL - II

From Examples of JDBC -- Microsoft Access CPS616 -- Information Track of CPS -- Spring Semester 97. by Sangeeta Aggarwal,Tom Pulikal,Udayan Pravate(Nancy McCracken) *

1 Syntax of SELECT clause:
2 SELECT {*|expression1[ASalias1][,expression2[ASalias2][,..]]]}
3 Example: SELECT *
4 SELECT LastName
5 SELECT [Customer#], LastName, FirstName
6 Syntax of FROM clause:
7 FROM table-or-query [AS alias]
8 Example: SELECT * from tblOrder;
9 SELECT OrderId, OrderDate FROM tblOrder as [Orders Table];
10 Syntax of WHERE clause:
11 WHERE expression1 [{And|Or} expression2[..]]
12 Example: SELECT OrderId FROM tblOrder WHERE OderTakerId = 2;
13 SELECT OrderId, OrderDate FROM tblOrder WHERE Sex="Female" AND Age BETWEEN 21 AND 29;
14 Syntax of ORDER BY clause:
15 ORDER BY column1 [{ASC|DESC}][,column2[{ASC|DESC}][,..]]
16 Example: SELECT * FROM tblCustomer ORDER BY LastName, FirstName;

Table Font Size


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Thu Aug 14 1997