An Introduction to SQL

 < Day Day Up > 

VBA isn't the only language Access understands. Structured Query Language (SQL) is the de facto language of relational databases, and as such, Access also speaks SQL. Specifically, Access speaks a dialect known as Jet SQL. Although you'll often hear Jet SQL called Access SQL, SQL speaks to Jet, not Access. This appendix covers general information about Jet SQL as well as syntax instructions and a short language reference. This short appendix is meant to serve as a simple introduction to the most common and basic statements and certainly isn't inclusive of all SQL statements and rules.

SQL is the industry's standard support language for relational databases. There are a number of relational databases on the market and each has its own version of SQL. As mentioned, Access uses Jet SQL. Originally, SQL was called Structured English Query Language, pronounced sequel. Because of a legal conflict with the name, the language was renamed to SQL, pronounced "s-q-l".

You'll still hear it pronounced sequel, but don't be so quick to correct someone they might be showing their many years of experience in the product. Many were around when it was actually called sequel, and thus still do out of habit, not ignorance.


Many standards, including the standard for SQL, are adopted, coordinated, and maintained by the American National Standards Institute (ANSI). For more information on SQL standards, visit


Although there is a standard for SQL, no product actually implements the full SQL standard. This appendix discusses the Jet version of SQL; the statements demonstrated here might not work in any other database.

You use Jet SQL to interact with the actual data via Jet. As such, statements are broken into two distinct areas:

  • Data Manipulation Language Use DML to retrieve, modify, and delete existing data or add new data.

  • Data Definition Language Use DDL to manage the objects in your database. This appendix doesn't cover DDL.


Throughout this appendix, you'll find literal examples that correspond with data and tables in the TimeTrack sample database. These examples are illustrative only. Please don't actually run them against your sample database, because doing so might affect the outcome of working chapter examples. If you really want to see the examples at work, create a copy of the finished database and run the examples against the copy.

     < Day Day Up > 

    Automating Microsoft Access with VBA
    Automating Microsoft Access with VBA
    ISBN: 0789732440
    EAN: 2147483647
    Year: 2003
    Pages: 186 © 2008-2017.
    If you may any questions please contact us: