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 2005 Forums
 SQL Server Administration (2005)
 create table as select * from tab

Author  Topic 

AdiI
Starting Member

31 Posts

Posted - 2009-12-23 : 06:45:22
i have found very strange thing in sql server i'm looking for a statement like create table abc as select starid, starname from star
but it does not allow me to create table like this i just replace table with view it created. my question is there any way to create table like this and why does sqlserver not support this??


adeel

brian147
Starting Member

10 Posts

Posted - 2009-12-23 : 06:58:59
try:
select starid, starname
INTO abc
from star
Go to Top of Page

AdiI
Starting Member

31 Posts

Posted - 2009-12-23 : 07:15:46
thanks boss thanks a lot

adeel
Go to Top of Page
   

- Advertisement -