Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Access
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
SELECT...INTO Statement
 

Creates a make-table query (make-table query: A query (SQL statement) that creates a new table and then creates records (rows) in it by copying records from an existing table.).

Syntax

SELECT field1[, field2[, ...]] INTO newtable [IN externaldatabase]
FROM source

The SELECT...INTO statement has these parts:

Part Description
field1, field2 The name of the fields to be copied into the new table.
newtable The name of the table to be created. If newtable is the same as the name of an existing table, a trappable error occurs.
externaldatabase The path to an external database (external database: The source of the table that is to be linked or imported to the current database, or the destination of a table that is to be exported.). For a description of the path, see the IN clause.
source The name of the existing table from which records are selected. This can be single or multiple tables or a query.

Remarks

You can use make-table queries to archive records, make backup copies of your tables, or make copies to export to another database or to use as a basis for reports that display data for a particular time period. For example, you could produce a Monthly Sales by Region report by running the same make-table query each month.

 Notes 



advertisement