Myself Ashutosh Kumar Verma from Varanasi. I am a Software Developer in MindStick Software pvt. ltd. Prayagraj. I have completed my MCA from VBSP. University, Jaunpur in 2021.
SQL command to copy data from one table into another table:
There are two different SQL command to copy all records or selected records from existing table into another table, which are like as-
1- INSERT INTO SELECT:
This SQL statement is used when need to copy all records of a table into another created table. In this statement a new table is need to create with same column and datatype as like existing table.
Syntax-
2- SELECT INTO:
This SQL statement is used when need to copy all records of existing table into a new table that are not created means here don’t need to create a new table because this SQL statement is copies all records as well as definitions of existing table and paste into new table name with column name and its datatype.
Syntax-
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
SQL command to copy data from one table into another table:
There are two different SQL command to copy all records or selected records from existing table into another table, which are like as-
1- INSERT INTO SELECT:
This SQL statement is used when need to copy all records of a table into another created table. In this statement a new table is need to create with same column and datatype as like existing table.
Syntax-
2- SELECT INTO:
This SQL statement is used when need to copy all records of existing table into a new table that are not created means here don’t need to create a new table because this SQL statement is copies all records as well as definitions of existing table and paste into new table name with column name and its datatype.
Syntax-