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 the View button 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 the Create tab on the Ribbon.
2. Click the Query Design button on the Other group.
3. In the Show Table dialog box, click the Close button.
4. Click the arrow on the View button and then click SQL View.
5. Type your SQL commands to create the query.
6. Click the Run button on the Ribbon to execute the query.