by rhyttinen on September 17, 2008
SQL (Structured Query Language) is a powerful database language used in queries. Each query that you create has an underlying SQL statement, which you can view or edit by clicking theViewbutton arrow on the Home Ribbon and then click SQL view. If you know SQL, you can create Select Queries as well as Action Queries by typing in the SQL statement in the SQL window.
An example of a simple select SQL statement would be: SELECT * FROM tblCustomers. This statement would return all records from tblCustomers. If you want to delete all records from tblCustomers from the state of Michigan, the equivalent SQL statement statement would read: DELETE * FROM tblStudents WHERE State = “MI”.
To Create a SQL Query
1. Click theCreate tabon the Ribbon.
2. Click theQuery Designbutton on the Other group.
3. In theShow Table dialog box, click theClose button.
4. Click thearrowon the View button and then clickSQL View.
5. Type your SQL commands to create the query.
6. Click theRun button on the Ribbon to execute the query.