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.
| Author |
Topic |
|
Suhanti
Starting Member
9 Posts |
Posted - 2009-02-26 : 07:59:11
|
| Hello All,I am currently writing syntax in the blind as I don't have access to data or the database. Can you help me.Can you create table as cREATE TABLE xyx as Select *from existing table;Kind regardsSu |
|
|
bjoerns
Posting Yak Master
154 Posts |
Posted - 2009-02-26 : 08:09:24
|
| [code]SELECT *INTO xyzFROM existing_table[/code] |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-02-26 : 08:17:33
|
quote: Originally posted by bjoerns
SELECT *INTO xyzFROM existing_table
And if you just need the structure without the data, thenSELECT *INTO xyzFROM tran_bookings where 1=2 |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-02-26 : 08:21:07
|
| Not sure you are asking this though, your subject speaks of something else. |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-26 : 08:46:00
|
quote: Originally posted by Suhanti Hello All,I am currently writing syntax in the blind as I don't have access to data or the database. Can you help me.Can you create table as cREATE TABLE xyx as Select *from existing table;Kind regardsSu
But you need to have necessary permissions first. |
 |
|
|
Suhanti
Starting Member
9 Posts |
Posted - 2009-02-26 : 10:23:32
|
| Sorry folks, Had another ranking question, but I didn't put it down.thanks!Just realised that this is SQL Server 2000. Can it handle advanced query functions? |
 |
|
|
Suhanti
Starting Member
9 Posts |
Posted - 2009-02-26 : 10:29:02
|
| Hello Again, It's my mistake, again. Sorry really blur.Okay I understand. Posted - 02/26/2009 : 08:17:33 -------------------------------------------------------------------------------- quote:--------------------------------------------------------------------------------Originally posted by bjoernsSELECT *INTO xyzFROM existing_table--------------------------------------------------------------------------------And if you just need the structure without the data, thenSELECT *INTO xyzFROM tran_bookings where 1=2 As for, it merely recreates the table "shell" ? then reimport the data?Thank you I am very new to this.Sincerely Su |
 |
|
|
|
|
|