Work with tables or indexes by using an SQL data-definition query

Work with tables or indexes by using an SQL data-definition query

Use SQL data-definition queries to create, delete, or alter tables or create indexes in the current database.

  1. In the Database window, click Queries under Objects, and then click New on the Database window toolbar.

  2. In the New Query dialog box, click Design View, and then click OK.

  3. Without adding tables or queries, click Close in the Show Table dialog box.

  4. On the Query menu, point to SQL Specific, and then click Data Definition.

  5. Enter the SQL statement for your data-definition query. Each data-definition query consists of just one data-definition statement. Microsoft Access supports these data-definition statements:
  6. To run the query, click Run on the toolbar.

Caution   If you convert a data-definition query to another type of query, such as a select query, you'll lose the SQL statement that you entered.

Notes