SQL SELECT INTO Statement

With SQL, you can copy information from one table into another.

The SELECT INTO statement copies data from one table and inserts it into a new table.

The SQL SELECT INTO Statement

The SELECT INTO statement selects data from one table and inserts it into a new table.

SQL SELECT INTO Syntax

We can copy all columns into the new table:

SELECT *
INTO newtable [IN externaldb]
FROM table1;

Or we can copy only the columns we want into the new table:

SELECT column_name(s)
INTO newtable [IN externaldb]
FROM table1;

SQL SELECT INTO Examples

Create a backup copy of Customers:

SELECT *
INTO CustomersBackup2013
FROM Customers;