Re: Constraint Messages
From: Rashid Karimov <rashid_at_rk.wbs.com>
Date: 1996/12/04
Message-ID: <584ng6$iq8_at_nnrp3.farm.idt.net>#1/1
Date: 1996/12/04
Message-ID: <584ng6$iq8_at_nnrp3.farm.idt.net>#1/1
Suzanne Douglas (wdouglas_at_istar.ca) wrote:
: Is there a way of specifing when creating a check constraint the message
: that must be displayed upon failure ?.
I beleive if you use named constraint in DDL , then you get the name whenever the constraint is violated. create table A ( b number, constraint b_positive check ( b >= 0 ) );
:
SQL> create table a
2 ( b number,
3 constraint check_b check ( b > 0));
Table created.
SQL> insert into a values (-1);
insert into a values (-1)
*
ERROR at line 1:
ORA-02290: check constraint (CHECK_B) violated
: Thanks in advance,
: Winston
: Toronto, Ontario
--
------------------
Beyond the horizon of the place we lived when we were young
In the world of magnets and miracles
Our thoughts strayed constantly and without boundary
The ringing of the division bell had begun ...
-=PF, The Division Bell=-
Received on Wed Dec 04 1996 - 00:00:00 CET
