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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Replicating an existing table

Author  Topic 

karan@talash.net
Starting Member

12 Posts

Posted - 2002-07-01 : 04:41:38
Hi Viewer,
I want to replicate an existing table.The sql i am using is "create table tbl_name(fld1 datatype,fld2 datatype) AS (select * from tbl2)".
Regards,
Karan

Nazim
A custom title

1408 Posts

Posted - 2002-07-01 : 04:56:10
Select fld1,fld2 into tbl_name from tbl2

should work. but remember it will lock system tables in the tempdb database till the select completes.

-------------------------
What lies behind you and what lies ahead of you are small matters compared to what lies within you.-Ralph Waldo Emerson


Edited by - Nazim on 07/01/2002 04:58:35
Go to Top of Page
   

- Advertisement -