In this article we are going to how to copy an existing table to new table in SQL Server with an example.
The SQL Server (Transact-SQL) SELECT INTO statement is used to create a new table from an existing table by copying the existing table's schema and data. It is important to note that when creating a table in this way, the new table will be populated with the records from the existing table (based on the SELECT Statement).
Let’s see simple an example of SELECT INTO statement
SELECT INTO statement
SELECT * INTO NEW_CUSTOMER from CUSTOMER
In above example, we have a customer table, which is copied customer table data and schema to the new Customer table.
I hope it will help you after reading it.