Archives of the TeradataForum
Message Posted: Thu, 02 Mar 2006 @ 19:28:46 GMT
Situation: At SQL Assistant, I need to create a table using an autonumber field as part of a composed primary key
Complication: When I set that autonumber field on UNIQUE PRIMARY INDEX statement, I get an error msg 5784 - "illegal use of identity field".
What am I doing wrong? Where can I find more details about this kind of error msg?
CREATE TABLE LIB.TABLE ( Transaction_ID INTEGER TITLE 'Transaction ID' NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 999999999 NO CYCLE), Party_ID INTEGER TITLE 'Party ID' NOT NULL) UNIQUE PRIMARY INDEX ( Transaction_ID , Party_ID );
The intention is to have a table like if we have this on the table:
Transaction_ID Party_ID 1 1 1 2 2 1
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|