Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

constraint transfer in CREATE TABLE as subquery

804267Nov 27 2010 — edited Sep 10 2012
I tried to create table from subquery that involves join operation. the tables:
create table t1(
col1 number
,col2 number
,col3 varchar2(50) not null
,constraint ck check(col2>col1)
)
create table t2(
col1 number
,col2 number
,col3 varchar2(100) not null
,constraint ck1 check(col2l>100)
)
create table composite as select * from t1 left join t2 using(col1,col2)
I checked the constraints formed in table composite and only the attribute level constraint in t1.col3 is copied. what about the other constraints? are they excluded since they're table-level constraint? thanks

Edited by: 801264 on Nov 27, 2010 4:07 AM
This post has been answered by Solomon Yakobson on Nov 27 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 8 2012
Added on Nov 27 2010
7 comments
5,434 views