How data can be copied from one table to another table?
How data can be copied from one table to another table?
52110-Nov-2021
Updated on 10-Nov-2021
Home / DeveloperSection / Forums / How data can be copied from one table to another table?
How data can be copied from one table to another table?
Steilla Mitchel
11-Nov-2021SQL 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-