How to Create Duplicate table in Sql Database with or without data of SQL Database table .
1. Using SELECT INTO with a WHERE condition that never matches:
This method creates a new table with the same structure but does not copy any data.
Syntax:
SELECT *
INTO NewTable
FROM ExistingTable
WHERE 1 = 0;
2. Using SELECT INTO without a WHERE condition that copy the same data:
This method creates a new table with the same structure and aslo copy data.
Syntax:
SELECT *
INTO NewTable
FROM ExistingTable;
How to Create Duplicate table in Sql Database
Reviewed by Rikesh
on
May 17, 2023
Rating:

No comments: