English 中文(简体)
MS Access - SQL View
  • 时间:2024-12-22

MS Access - SQL View


Previous Page Next Page  

In this chapter, we will be covering the SQL view. Whenever you create a query in query design, Access automatically creates the SQL query for you. This actually retrieves data from the tables. To see how your query is created in sql when you create it in query design, let us open your database.

Select the Query Design from the Create tab and add the tblEmployees table.

SQL View

Employee Design

Select the field you want to see as query result and then run your query.

Field Query Result

You can now see all the employee information as query result. You have selected certain fields in the Query Grid; at the same time, MS Access has also created an SQL Query with the results obtained from your Query Grid.

To view the SQL, go to the Home tab. Select SQL View from the View menu and you will see the SQL of your query.

Home Tab

Example

The following is another example wherein, we will see the projects in progress.

Project Progress

Navigation Relationship

Let us now run your query.

Task Title

To see the SQL, select the SQL View from the View menu.

SQL Query

You can see the SQL query which is generated by Access automatically. This helps retrieve data from two tables.

Advertisements