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 |
|
surenhr
Starting Member
5 Posts |
Posted - 2007-08-22 : 15:28:22
|
| Hi..i logged in to query editor of sql server 2005create table test as (select * from dummy); orcreate table test as select * from dummy;when i executed this command it shows an error:-> invalid syntax near as.any comments!!!!!!!!!!!!!! |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-22 : 15:29:14
|
select *into testfrom dummywhere 1 = 0Read Books Online. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
surenhr
Starting Member
5 Posts |
Posted - 2007-08-22 : 15:33:51
|
| will it create a new table test and populate it with all the contents of dummy ????? |
 |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-08-22 : 15:35:47
|
quote: Originally posted by surenhr will it create a new table test and populate it with all the contents of dummy ?????
why dont you try it and see for youself?Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-22 : 15:47:33
|
quote: Originally posted by surenhr will it create a new table test and populate it with all the contents of dummy ?????
If you also want the contents, remove the WHERE part. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
surenhr
Starting Member
5 Posts |
Posted - 2007-08-22 : 15:57:21
|
| thank u very much Sir ...:-) |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-22 : 15:58:35
|
Please remember that indexes, triggers, constraints are not transferred. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-08-24 : 05:36:05
|
| Another approachselect Top 0 *into testfrom dummyMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|