Hi,
I am using Data Modeler of 2000e.
To define a check constraint on a particular
column of a table,usually I open the Specification
then click in the Check Constraint Tab.
In the expression I write down the constraint,
in your case it will be
numero between 1 and 45
It works for me , I am sending an example
CREATE TABLE "walker"."wl" (
"id" NUMBER ( 5 ) NOT NULL,
"name" VARCHAR2 ( 30 ) NOT NULL,
"user_id" NUMBER ( 5 ) NOT NULL,
"session_id" NUMBER ( 5 ) NOT NULL,
CONSTRAINT "PK_wl1" PRIMARY KEY ("id"),
CONSTRAINT "TC_wl14" CHECK (id between 1 and 1000)
);
I had entered the expression in the Check constraint as:
id between 1 and 1000
Hope it helps.
Maheswari
Nicolas Christian wrote:
> Hello,
>
> First , I have defined a domain named PID as INTEGER with this following
> check contraint:
> PID between 1 and 45
> After that, I have assigned this domain to a column named NUMERO into a
> table named TAB1.
> At this end, I have generated the DDL file (SQL script) in order to create
> my data base.
>
> The contain of this DDL file was wrong as shown bellow:
> CREATE TABLE TAB1(
> ...
> numero INTEGER,
> ...
> );
> ALTER TABLE TAB1 ADD CHECK (PID between 1 and 45); // this line
> seems wrong
>
> but I was expected the following result:
> CREATE TABLE TAB1(
> ...
> numero INTEGER CONSTRAINT CKC_NUMERO_PID check (numero between 1 and
> 45),
> ...
> );
> If someone could tell me the right way to do that, or if you have
> any rose project (mdl file) as example, I will be very please.
>
> Christian
>
> ************************************************************************
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
>http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> *************************************************************************
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************