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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How can I define that the value of a column should always be in UPPER case

183094Apr 8 2002
Hi,

I want to make sure that the value in a column is always in UPPER case.
Can we give this condition while creating or altering a table.

A trigger can do it easily, but I was wondering if we could define a column to have values with upper case all the time, independent of what values are inserted. I mean if we give a lower case value in the insert statement, it should be converted automatically to upper case & stored.

I want something like

Alter table MY_TABLE Modify ( col1_upper varchar2(25) default UPPER(Col1_upper));
But the above statement does not work as it references the col of the table.

Thanks
Sunil
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2002
Added on Apr 8 2002
2 comments
1,748 views