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
 Transact-SQL (2000)
 Creating table

Author  Topic 

sagavb
Starting Member

18 Posts

Posted - 2009-05-29 : 06:45:26
Hi,

how to create a new table from an existing table along with its records?

Regards

Saga

sagavb
Starting Member

18 Posts

Posted - 2009-05-29 : 06:47:25
quote:
Originally posted by sagavb

Hi,

how to create a new table from an existing table along with its records?

BUT WITHOUT USING "INTO"

Regards

Saga

Go to Top of Page

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-05-29 : 07:00:48
quote:
Originally posted by sagavb

quote:
Originally posted by sagavb

Hi,

how to create a new table from an existing table along with its records?

BUT WITHOUT USING "INTO"

Regards

Saga




with out into means
u have to create the a table having same structure as existing table and insert that tabledata into newtable
Go to Top of Page

sagavb
Starting Member

18 Posts

Posted - 2009-05-29 : 07:06:03
Yes.

Select * INTO newtable from existingtable

Is there any other way to create a table with same structure and data from an existing table?

Regards
Saga

quote:
Originally posted by bklr

quote:
Originally posted by sagavb

quote:
Originally posted by sagavb

Hi,

how to create a new table from an existing table along with its records?

BUT WITHOUT USING "INTO"

Regards

Saga




with out into means
u have to create the a table having same structure as existing table and insert that tabledata into newtable

Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-05-29 : 07:11:20
Select * INTO new_table from existing_table
is exactly what you need to the job.

I cannot understand why this should be done without using INTO


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-05-29 : 07:22:55
Oh, SagaVB has asked a number of question recently regarding easy things.
But by NOT using the obvious tools.

I asked him if this was home work questions, and he said yes.
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=126698


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-05-29 : 08:08:11
And? Could yo talk to his professor?



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -