Skip to Main Content

Oracle Database Discussions

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!

data type size for the view column

satishasnaniMay 19 2011 — edited May 20 2011
I am creating a view from base table using substr() for some fields. The data type size of the column in the view becomes twice the size of the corresponding column in the base table. Example

SQL> create table temp_sat(name varchar2(20));
Table created.

SQL> create view temp_view as select substr(name,1,10) name from temp_sat;
View created.

SQL> desc temp_view
Name Null? Type
----------------------------------------- -------- ----------------------------
NAME VARCHAR2(40)

Can i specify the size of the column while creating view
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2011
Added on May 19 2011
5 comments
7,601 views