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)
 Create table "like" (as in Db2)

Author  Topic 

hvdtol
Yak Posting Veteran

50 Posts

Posted - 2002-06-17 : 13:24:53
Hello,

Hope someone can help me.

In Db2 i have the possibility to create one table from one database into a second database with the same column names from table one.

CREATE TABLE DBNAME2.TAB2 LIKE DBNAME1.TAB1

It their some easy way to do this in Sql Server, as i cannot find it in the create statements.

Thanks in advance.

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-06-17 : 13:28:17
look up 'SELECT INTO' in books on line

<O>
Go to Top of Page

hvdtol
Yak Posting Veteran

50 Posts

Posted - 2002-06-18 : 05:35:33
Yes indeed, this is what i wanted.
Thanks!

Regards,

Harry

Go to Top of Page
   

- Advertisement -