Monday, February 8, 2010

SQL SELECT INTO - Introduction and syntax

Explain the SQL SELECT INTO statement. Write SQL syntax for the SQL SELECT INTO statement along with an example.

SQL SELECT INTO: The SELECT INTO statement selects data from one table and inserts it into a different table. Used often for creating back up’s.

Syntax:
SELECT * INTO new_table_name [IN externaldatabase] FROM old_tablename

Example:
SELECT * INTO employee_Backup FROM employee

No comments:

Post a Comment