Create a Copy/Dummy of a existing table

Step 1> Create a table

CREATE TABLE Test
(ID INT,
FirstName VARCHAR(40),
LastName VARCHAR(40))

Step 2> Insert some items in this table...My table have some data shown below

ID FirstName LastName
1 Pankaj pandey
2 Rahul Pandey
3 Ramesh Mishra
4 Raja Singh

Step 3> Write given query to make dummy table

Select * into <New Table Name> from <Existing Table Name>

EX-

select * into dummytest from Test 


step 4> Now check ..

Select * from dummytest  

 it shows exactly same data as existing table Test.

ID FirstName LastName
1 Pankaj pandey
2 Rahul Pandey
3 Ramesh Mishra
4 Raja Singh

Ebook Download
View all
Learn
View all