You can copy rows into a new table using a Make Table query, which is useful for creating subsets of data to work with or copying the contents of a table from one database to another. A Make Table query is similar to an Insert query, but creates a new table to copy rows into.
Note In Oracle, a Make Table query is implemented as a Create Table As Select command. For details, see Query Designer Considerations for Oracle Databases.
When you create a Make Table query, you specify:
For example, the following query creates a new table called uk_customers
and copies information from the customers
table to it:
SELECT *
INTO uk_customers
FROM customers
WHERE country = 'UK'
In order to use a Make Table query successfully:
To create a Make Table query
To create a destination table in another database, specify a fully qualified table name including the name of the target database, the owner (if required), and the name of the table.
The Query Designer adds the columns you choose to the Column column of the Grid pane.
If you do not specify a search condition, all rows from the source table will be copied to the destination table.
Note When you add a column to search to the Grid pane, the Query Designer also adds it to the list of columns to copy. If you want to use a column for searching but not copy it, clear the check box next to the column name in the input source window ().
When you execute a Make Table query, no results are reported in the Results pane. Instead, a message appears indicating how many rows were copied.