Home » RDBMS Server » Server Utilities » Creating a table from another table
Creating a table from another table [message #72927] Tue, 16 December 2003 10:09 Go to next message
leena
Messages: 8
Registered: September 2000
Junior Member
How do we copy the constraint along with the table in
Create table <name> ....as select ...
statement
Re: Creating a table from another table [message #72929 is a reply to message #72927] Wed, 17 December 2003 02:16 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
i beleive you have to recreate the constraints, if the table is created using CREATE TABLE ... AS SELECT .. FROM ANOTHER_TABLE.

Re: Creating a table from another table [message #72930 is a reply to message #72927] Wed, 17 December 2003 04:49 Go to previous message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
not in CTAS(except for explicit NOT NULL constraints). Either you can ALTER TABLE ADD CONSTRAINT after the CTAS is done or you can reverse engineer the CREATE TABLE statement,create the table and then do a INSERT INTO ..Select * from .

-Thiru
Previous Topic: Re: FREE OCP PAPERS
Next Topic: Session
Goto Forum:
  


Current Time: Mon Jul 01 01:41:20 CDT 2024