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!

CAST(NULL AS DATE) COLNAME IN CREATE TABLE ACTUALLY CREATES A COLUMN AS VAR

542048May 13 2008 — edited May 14 2008
I try to create a table using "create table as select" and specify that one of the columns should be "CAST(NULL AS DATE) COLNAME" to ensure that it is of type DATE. I will later attempt to create a materialised view on this table, unioned with another which also has a date column. This column therefore has to have the same datatype of date.

When I create the table using cast, then describe the table, it has actually created it as a varchar2. I can't build my materialised view because of this.

Many thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2008
Added on May 13 2008
6 comments
14,681 views