eHow launches Android app: Get the best of eHow on the go.

How To

How to Create SQL Queries in Microsoft Access

Contributor
By C.D. Crowder
eHow Contributing Writer
(0 Ratings)

Microsoft Access allows you to create regular and SQL queries. SQL, or Structured Query Language, queries are typed into a Notepad-type screen instead of in the commonly used grid layout of Design View. Access assists you with SQL queries by providing the basic setup for the most common SQL queries used in Access databases.

Difficulty: Moderate
Instructions
  1. Step 1

    Open an existing Microsoft Access database. If creating a new database, note that queries will not yield results until tables are filled with data.

  2. Step 2

    Select "Queries" in the database window. Open an existing query in Design View by highlighting the query and pressing "Design" in the query window. Create a new query by pressing "Create a new query in Design View."

  3. Step 3

    Press the "Query Type" button on the query toolbar. Select your desired query type. This will provide you with a bare-bones SQL query. This isn't required if you are familiar with SQL programming. For more assistance, set up your basic query in Design View before switching to SQL View.

  4. Step 4

    Press the "View" button on the query toolbar. Select "SQL View."

  5. Step 5

    Type your SQL query as desired. End all SQL queries with a semicolon. Only the last line of the query requires a semicolon. Table names along with the desired field names are included after the first clause. The FROM clause should include your desired table name. Only the first two lines are required. Sorting and criteria require additional lines.

Tips & Warnings
  • To brush up on your SQL programming, visit the website listed in the Resources section.
  • Test all SQL queries immediately after creation to ensure all syntax is correct. A missing comma, period, semicolon or parenthesis can prevent the query from running correctly.

References

Resources
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics