Introduction to Jet SQL

Most databases, including Microsoft Access, incorporate one or more data languages for querying information and managing databases. The most common of these data languages is SQL (Structured Query Language), which contains a number of commands for querying and manipulating databases. SQL commands are typically grouped into one of two categories known as data manipulation language (DML) commands and data definition language (DDL) commands.

Microsoft Jet SQL follows a standard convention known as ANSI SQL, which is used by many database vendors, including Microsoft, Oracle, and IBM. Each manufacturer, however, incorporates its own proprietary language-based functions and syntax with Microsoft Jet SQL. Access is no exception with key differences in reserved words and data types.

To demonstrate Jet SQL, I use Access Queries in SQL View with Microsoft's sample Northwind database. Shown in Figure 8.1 is Microsoft's Northwind database.

Looking at the Queries window of the Northwind database.

Looking at the Queries window of the Northwind database.

After opening the Queries window in the Northwind database, you can see that the Access developers at Microsoft have created many queries.

Building queries in Microsoft Access is much like the experience of building tables and forms in Access. Essentially, Microsoft provides wizards and graphical interfaces for building everything, including queries. In this chapter, I show you how to go beyond Access wizards to build your own queries using SQL!

To access the SQL window in Access, select a query and then press the Design button as I've done with the Northwind Current Product List query in Figure 8.2.

Once the query is open in Design mode, select View, SQL View from the menu, which I've done for the Northwind Current Product List query in Figure 8.3.

Tgi^ You can also access the SQL View menu item when creating a new query, but [^TK^i the SQL View menu item is only available when a query is in Design mode.

SQL is not considered to be full-fledged programming language like VBA, C, or Java. In this author's mind, a real programming language must, at minimum, contain facilities for creating variables, as well as structures for conditional logic branches and iteration through loops. Regardless, SQL is a powerful language for asking the database questions (also known as querying).

Viewing the

Northwind Current Product List query in Design mode.

fZ Microsoft Access - [Current Product List : Select Query]

jP File Edit View Insert Query Tods Window Help


0 0

Post a comment