SQL SELECT INTO

SELECT INTO statement copies data from one table to new table.

Syntax:

SELECT * INTO new_table
FROM old_table
WHERE condition;

Example:  To copy records from one table to a new table.

SELECT * INTO old_students
FROM students
WHERE condition;

Records can be copied from one table to new table into another database.

Syntax: To copy the records from one table to new table of other database.

SELECT * INTO new_table [IN externaldb]
FROM old_table
WHERE condition;

Example:

SELECT * INTO student1 IN 'Clg.mdb'
FROM students;

This statement uses IN clause to copy records from one table to new table of other database.

Selected columns can also can be copied from one table to new table by selecting them using SELECT statement.