|
I added a check constraint to a column and got the following:
CREATE TABLE T_Full_Time (
salary VARCHAR ( 255 ) NOT NULL, T_Employee_ID INTEGER NOT NULL, TEST_FLAG CHAR ( 1 ) NOT NULL, CONSTRAINT PK_T_Full_Time16 PRIMARY KEY (T_Employee_ID), CONSTRAINT CK_FULL_TIME_TEST_FLAG CHECK (CHECK (TEST_FLAG IN ('Y', 'N')),) ); I think this was what you were expecting. I added the check
constraint to the COLUMN SPECIFICATION for the TEST_FLAG column.
Regards,
Walter
>>> Nicolas Christian <[EMAIL PROTECTED]> 02/28/01 07:59AM >>> 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) How specify a check contrainte in data modeler Nicolas Christian
- Re: (ROSE) How specify a check contrainte in dat... Maheswari Subburaman
- Walter Howard
