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)
 Creating Tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-29 : 09:25:58
Pete writes "Hi guys,

Can you tell me if there is a method of creating a table based upon the selected fields from a Select statement or a view even ??

I know you're not Oracle etc but in Oracle there's a %Type ? is there an equivalent in SQL Server ?

Thanks

Pete"

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-05-29 : 09:42:37
take a look at "select ... into ..." in books on line

<O>
Go to Top of Page

OMB
Yak Posting Veteran

88 Posts

Posted - 2002-05-29 : 09:43:34
select * from table
into newtablename


Should do the trick

Go to Top of Page

OMB
Yak Posting Veteran

88 Posts

Posted - 2002-05-29 : 09:46:39
oops too late!

Go to Top of Page
   

- Advertisement -