Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Constraint Implementation Question
A copy of this was sent to dan.hield_at_mcmail.com
(if that email address didn't require changing)
On Tue, 01 Dec 1998 21:47:52 GMT, you wrote:
>I have an Oracle7 database on which I wish to enforce a table column to only
>contain upper case text. Can anyone tell me if this can be implemented
>declaratively or must it be done with the use of a trigger? Which ever the
>case, can you offer any suggestions that would help me do such a thing?
>
>Many thanks!
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
you can do it with a declaritive constraint as:
SQL> create table T ( some_data varchar2(30) check (upper(some_data) = some_data) );
Table created.
SQL> insert into t values ( 'x' );
insert into t values ( 'x' )
*
SQL> insert into t values ( 'X' );
1 row created.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
--
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue Dec 01 1998 - 22:20:14 CST
![]() |
![]() |