Hi,
Regarding to create table as
subquery, I've read that:
The column data type definitions and the NOT NULL constraint are passed to the new table. Note that only the explicit NOT NULL constraint will be inherited. The PRIMARY KEY column will not pass the NOT NULL feature to the null column. Any other constraint rules are not passed to the new table. However, you can add constraints in the column definition.
Can someone explain me, how to do this? Or, how should we specify the constraints (and also the default values of the columns, because it is possible) for the columns in the column definition?
Also, i don't understand this: The PRIMARY KEY column will not pass the NOT NULL feature to the null column.
Can someone give me some small examples regarding to these?
For example, this generates an error:
create table test1 (a, b, c default sysdate)
as
select 1, 'b' from dual
Thanks!
Edited by: Roger22 on 01.09.2011 11:37