![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
gopi.anoop (AT) gmail (DOT) com> wrote in message news:6ff9e039-b35e-403d-8d45-3df318630e18 (AT) x35g2000hsb (DOT) googlegroups.com... Hi, I have one table named "table2". I wanted to create one new table "table1" having the exact data structure of "table1". In Oracle we can do like, create table table1 as select * from table2; Pls tell the query for SYBASE Regards, Offhand, you have to set the database (rough equivalent to Oracle schema) option to allow the "select into" option. Then you can select * into new_table from old_table And then you should do a backup since this is a minimally logged operation. (And turn off the option if it is unneeded.) A problem is that new_table will NOT inherit any check or rule constraints nor any indexes. The column definitions will not be for a usertype (if old_table used any) but for a base type. |
#12
| |||
| |||
|
|
gopi.anoop (AT) gmail (DOT) com> wrote in message news:6ff9e039-b35e-403d-8d45-3df318630e18 (AT) x35g2000hsb (DOT) googlegroups.com... Hi, I have one table named "table2". I wanted to create one new table "table1" having the exact data structure of "table1". In Oracle we can do like, create table table1 as select * from table2; Pls tell the query for SYBASE Regards, Offhand, you have to set the database (rough equivalent to Oracle schema) option to allow the "select into" option. Then you can select * into new_table from old_table And then you should do a backup since this is a minimally logged operation. (And turn off the option if it is unneeded.) A problem is that new_table will NOT inherit any check or rule constraints nor any indexes. The column definitions will not be for a usertype (if old_table used any) but for a base type. |
#13
| |||
| |||
|
|
gopi.anoop (AT) gmail (DOT) com> wrote in message news:6ff9e039-b35e-403d-8d45-3df318630e18 (AT) x35g2000hsb (DOT) googlegroups.com... Hi, I have one table named "table2". I wanted to create one new table "table1" having the exact data structure of "table1". In Oracle we can do like, create table table1 as select * from table2; Pls tell the query for SYBASE Regards, Offhand, you have to set the database (rough equivalent to Oracle schema) option to allow the "select into" option. Then you can select * into new_table from old_table And then you should do a backup since this is a minimally logged operation. (And turn off the option if it is unneeded.) A problem is that new_table will NOT inherit any check or rule constraints nor any indexes. The column definitions will not be for a usertype (if old_table used any) but for a base type. |
#14
| |||
| |||
|
|
gopi.anoop (AT) gmail (DOT) com> wrote in message news:6ff9e039-b35e-403d-8d45-3df318630e18 (AT) x35g2000hsb (DOT) googlegroups.com... Hi, I have one table named "table2". I wanted to create one new table "table1" having the exact data structure of "table1". In Oracle we can do like, create table table1 as select * from table2; Pls tell the query for SYBASE Regards, Offhand, you have to set the database (rough equivalent to Oracle schema) option to allow the "select into" option. Then you can select * into new_table from old_table And then you should do a backup since this is a minimally logged operation. (And turn off the option if it is unneeded.) A problem is that new_table will NOT inherit any check or rule constraints nor any indexes. The column definitions will not be for a usertype (if old_table used any) but for a base type. |
#15
| |||
| |||
|
|
gopi.anoop (AT) gmail (DOT) com> wrote in message news:6ff9e039-b35e-403d-8d45-3df318630e18 (AT) x35g2000hsb (DOT) googlegroups.com... Hi, I have one table named "table2". I wanted to create one new table "table1" having the exact data structure of "table1". In Oracle we can do like, create table table1 as select * from table2; Pls tell the query for SYBASE Regards, Offhand, you have to set the database (rough equivalent to Oracle schema) option to allow the "select into" option. Then you can select * into new_table from old_table And then you should do a backup since this is a minimally logged operation. (And turn off the option if it is unneeded.) A problem is that new_table will NOT inherit any check or rule constraints nor any indexes. The column definitions will not be for a usertype (if old_table used any) but for a base type. |
#16
| |||
| |||
|
|
gopi.anoop (AT) gmail (DOT) com> wrote in message news:6ff9e039-b35e-403d-8d45-3df318630e18 (AT) x35g2000hsb (DOT) googlegroups.com... Hi, I have one table named "table2". I wanted to create one new table "table1" having the exact data structure of "table1". In Oracle we can do like, create table table1 as select * from table2; Pls tell the query for SYBASE Regards, Offhand, you have to set the database (rough equivalent to Oracle schema) option to allow the "select into" option. Then you can select * into new_table from old_table And then you should do a backup since this is a minimally logged operation. (And turn off the option if it is unneeded.) A problem is that new_table will NOT inherit any check or rule constraints nor any indexes. The column definitions will not be for a usertype (if old_table used any) but for a base type. |
#17
| |||
| |||
|
|
gopi.anoop (AT) gmail (DOT) com> wrote in message news:6ff9e039-b35e-403d-8d45-3df318630e18 (AT) x35g2000hsb (DOT) googlegroups.com... Hi, I have one table named "table2". I wanted to create one new table "table1" having the exact data structure of "table1". In Oracle we can do like, create table table1 as select * from table2; Pls tell the query for SYBASE Regards, Offhand, you have to set the database (rough equivalent to Oracle schema) option to allow the "select into" option. Then you can select * into new_table from old_table And then you should do a backup since this is a minimally logged operation. (And turn off the option if it is unneeded.) A problem is that new_table will NOT inherit any check or rule constraints nor any indexes. The column definitions will not be for a usertype (if old_table used any) but for a base type. |
![]() |
| Thread Tools | |
| Display Modes | |
| |