![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi there Is there a way of creating a table in sybase like in oracle CTAS e.g. Create table MYTABLE tablespace MYSPACE as select * from test.mytable In sybase the only way that I know is bcp out create a table bcp in and then re name... is there a better way?? Many tanks Maria |
#3
| |||
| |||
|
|
Hi there Is there a way of creating a table in sybase like in oracle CTAS e.g. Create table MYTABLE tablespace MYSPACE as select * from test.mytable In sybase the only way that I know is bcp out create a table bcp in and then re name... is there a better way?? Many tanks Maria |
#4
| |||
| |||
|
|
You can use SELECT INTO although you have to have this option turned on for the database. eg 1> create table mytable 2> (alpha char(1)) 3> go 1> select * into mytable2 2> from mytable 3> go This will copy the data you have too. If you don't want the data add the condition 'where 1=2' and you'll get just the structure. It won't copy any indexes or triggers and the job is not done as a transaction, so it's quicker but you can't roll it back. Regards Tom evoradba (AT) yahoo (DOT) ca (Maria) wrote in message news:<351fd9d6.0311201933.4b085f8b (AT) posting (DOT) google.com>... Hi there Is there a way of creating a table in sybase like in oracle CTAS e.g. Create table MYTABLE tablespace MYSPACE as select * from test.mytable In sybase the only way that I know is bcp out create a table bcp in and then re name... is there a better way?? Many tanks Maria |
![]() |
| Thread Tools | |
| Display Modes | |
| |