>> Was wondering what are the standards for CTAS. Oracle seems to honor
>> the NOT NULL modifier. This might be a bug if we do not honor
>> modifiers in CTAS.
>
> Given that CREATE TABLE AS creates a table based on the result of a
> query, it seems pretty logical that constraints wouldn't be copied
> over - they're part of the table, they're not visible in a query
> result.
>
Yeah agreed, it is just a SELECT query afterall.
> The documentation pretty clearly says you should use CREATE TABLE LIKE
> if you want to copy the constraints over, if you look at the CREATE
> TABLE manpage (not on the CREATE TABLE AS though - perhaps a note
> should be added there?)
>
I think the semantics should be pretty ok as is. But I saw another DB
honoring the NOT NULL modifiers and hence the wonder if there is
something about this in the standards.
Regards,
Nikhils
--
http://www.enterprisedb.com