1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Discuss in my forum

How To View and Edit SQL in Microsoft Access

By

How To View and Edit SQL in Microsoft Access
Mike Chapple
Did you know that you can view and edit the SQL statements that drive every Microsoft Access database query? In this article, we take a look at the process of accessing the underlying SQL code and tweaking it to perfect Access queries.

When using SQL statements in Microsoft access, you can generally use any SQL syntax. However, there are a few exceptions:
  • You can't use the DISTINCT clause within an aggregate function
  • You can't use the LIMIT TO xx ROWS clause
  • The single character wildcard in Access is ? rather than _.
  • The zero or more character wildcard in Access is * rather than %
Difficulty: Average
Time Required: 20 minutes

Here's How:

  1. Start Microsoft Access 2007.
  2. Open the database containing the query you wish to view or edit.
  3. Locate the query in Object Explorer and double-click on it to run the query.
  4. Pull down the View menu in the upper left corner of the ribbon.
  5. Select SQL view. This will display the SQL statement corresponding to the query.
  6. Make any edits you wish to the SQL statement in the query tab.
  7. Click the Save icon to save your work.
  1. About.com
  2. Technology
  3. Databases
  4. Microsoft Access
  5. Tutorials
  6. View and Edit SQL in Microsoft Access

©2014 About.com. All rights reserved.