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 |
|
born2acheive
Yak Posting Veteran
65 Posts |
Posted - 2006-12-05 : 05:44:30
|
| hi,i want to create table using another table but i am getting the following error.Server: Msg 156, Level 15, State 1, Line 2Incorrect syntax near the keyword 'AS'.my query is:CREATE TABLE errorlog AS SELECT * FROM log where 1=0 becos i a trying to copy the structure of the table log to table errorlog.please rectify my problem,please |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-05 : 05:47:02
|
| Are you using ORACLE?In SQL Server you should useSelect * into errorlog from log where 1=0MadhivananFailing to plan is Planning to fail |
 |
|
|
born2acheive
Yak Posting Veteran
65 Posts |
Posted - 2006-12-05 : 05:53:57
|
| hi madhivanan thankyou for you reply |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-05 : 07:45:23
|
| Note that this will not copy constraints/indexes/relationships from the original table.Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-05 : 09:59:44
|
quote: Originally posted by harsh_athalye Note that this will not copy constraints/indexes/relationships from the original table.Harsh AthalyeIndia."Nothing is Impossible"
Which is I forget to specify in my first replyMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|