Brief about Select….into statement with an example.
Select into is used to create back up copies of tables. It selects data from one table and inserts into another.
Syntax:Select * INTO dest_table_name FROM source_table_name
Example: Select data from customer table into customer_backup
Select * INTO customer_backup FROM customer;
It can also be used with WHERE clause for a condition.
Select * INTO customer_backup FROM customer WHERE cust_salary > 1000;