Subject Re: [ib-support] Firebird SQL - Alter table command (does it work?) - BUG?
Author Frank Ingermann
Hi Sanjay,

Sanjay Amatya wrote:
> Create a database test.gdb. Create a table test with fields objectid (Integer),
> 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);
^^^^ this should probably read USERID, right?

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