Subject | Re: [ib-support] Firebird SQL - Alter table command (does it work?) - BUG? |
---|---|
Author | Frank Ingermann |
Post date | 2002-04-25T22:35:32Z |
Hi Sanjay,
Sanjay Amatya wrote:
try
alter table TEST add constraint PK_TEST primary key (OBJECTID,USERID)
note the order: first the constraint name, then "PRIMARY KEY"
(also note the fields that make up the PK have to be defined as NOT NULL.)
regards & hth,
fingerman
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?
fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de
Sanjay Amatya wrote:
> Create a database test.gdb. Create a table test with fields objectid (Integer),^^^^ this should probably read USERID, right?
> userid (Integer), name (Varchar). Then try to add primary key constraint to the
> first 2 fields:
>
> ALTER TABLE TEST ADD CONSTRAINT PRIMARY KEY PK_TEST
> (OBJECTID, USERINSTID);
try
alter table TEST add constraint PK_TEST primary key (OBJECTID,USERID)
note the order: first the constraint name, then "PRIMARY KEY"
(also note the fields that make up the PK have to be defined as NOT NULL.)
regards & hth,
fingerman
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?
fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de