Hi On Sun, Sep 4, 2011 at 9:49 PM, Caleb <[email protected]> wrote:
> I'm trying to give names to all the constraints I create, but for some > reason, I can't change the name of the constraint for IDENTITY typed > columns, example: > DROP TABLE IF EXISTS SUPPLIERS; > CREATE TABLE SUPPLIERS ( > SUPPL_ID BIGINT IDENTITY(1,1), > SUPPL_DESC VARCHAR(50) NOT NULL, > > CONSTRAINT PK_SUPPLIERS PRIMARY KEY (SUPPL_ID), > CONSTRAINT UK_SUPPLIERS_DESC UNIQUE (SUPPL_DESC) > ); > > IDENTITY columns are automatically declared as being PK. So don't use IDENTITY use AUTO_INCREMENT. Or drop the first constraint. -- Vasile Rotaru -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
