Monday, July 28, 2014

How To Creating SQL-Specific Queries in Access 2003

SQL (Structured Query Language) is a powerful database language used in querying, updating, and managing relational databases. For each query, Access automatically creates an equivalent SQL statement. If you know SQL, you can edit this statement, or write an entirely new one, to create new, more powerful queries. Access supports three kinds of SQL-specific queries: union, pass-through, and data-definition. Each of these query types fulfills a different need.

Create a SQL-Specific Query

graphics/1_icon.jpg
In Query Design view, click the Query menu, and then point to SQL Specific.
graphics/2_icon.jpg
Click Union, Pass-Through, or Data Definition.
graphics/3_icon.jpg
Enter SQL commands to create the query.
graphics/4_icon.jpg
Save and view the query.
graphics/06inf24.jpg

Did You Know?

You can view a query in SQL. To see what your query looks like in SQL, click the View button and then click SQL View.


Types of SQL-Specific Queries

Type
Definition
Union
A query that combines related fields from multiple tables into one field, thus combining the data from several tables.
Pass-Through
A query that sends SQL commands directly to an SQL database server. This allows you to work with tables on the server instead of linking the tables to your Access database.
Data Definition
A query that deletes an index, or creates, alters, or deletes a table.