Click here to Skip to main content
14,770,630 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how can i make a query for inserting existing data for another table ?

use this--
insert into desttable (listofcolumns) select listofcolumn from sourcetable

Pravin Patil, Mumbai 8-Mar-11 7:54am
This query makes more sense..
Take my 5....
select * into [database_name].[dbo].[table_name] from [database_name].[dbo].[table_name]
Pravin Patil, Mumbai 8-Mar-11 7:55am
Another good solution..
only the thing is it will create new table....
My 5...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900