Re: Constraint question
Posted in 1993
> Example from CREATE TABLE, from page 3-42 of the ESQL/C manual.
>
> create table tab1
> (c1 integer not null unique constraint uc1,
> c2 integer,
> c3 integer not null,
> c4 char(10) not null,
> unique (c3, c4));>
> elsewhere we've seen references to "constraint code" and "constraint num".
>
> Both of us parse that first column as:
>
> define a new column called "c1". c1
> this column contains integers INTEGER
> do not let this column contain nulls NOT NULL
> do not let this column contain duplicate entries UNIQUE
> apply additional constraint CONSTRAINT UC1
Here you are not applying an additional constraint, you are saying that
the fact that c1 is require to be unique is to be stored under the name
of uc1. Check 'CREATE TABLE' under Notes #14 (4gl Ref manual). I would
think it would be under the same place in the ESQL/C manual. You are
correct in that it doesn't explicitly state that you are here defining a
constraint, but it does imply it.
That it confused you is good reason to bring it to the attention of the
documentation folks.
j.
_____________________________________________________________________________
Jack Parker - Contractor |
Hewlett Packard, BSMC Boise, Idaho, USA| If you keep staring at it like that,
jparker@hpbs2561.boi.hp.com | your nose is going to grow
(208) 396-5388 (W) (208) 384-1623 (H) | into the bark.
_____________________________________________________________________________