Select….into statement with an example

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;
Bulk copy with an example
Bulk copy utility of SQL allows data to be copied from one data file to another........
How bcp command prompt utility is used to import and export data
The bcp utility is accessed from the command prompt......
Describe how bulk insert statement is used to import data
Bulk Insert is used to copy data from a file into a table or view in a format as specified by the user........
Post your comment