Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 copy data from old to new table

Author  Topic 

simi28
Starting Member

27 Posts

Posted - 2007-04-03 : 02:27:23
Hi All
I have two tables one is old and another new table.
I need to copy the data from old to new table.
using stored procedure.
How can I do the same.
Please help me.

Thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-03 : 02:32:09
insert newtable (col1 col2, col3, ...)
select col1, col2, col3, ...
from oldtable


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

simi28
Starting Member

27 Posts

Posted - 2007-04-03 : 02:56:13
thanks for your reply.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-04-03 : 03:11:38
Also Learn SQL

http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -