SERIAL and Primary Key

From: "Mike Gould" <mgould(at)allcoast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: SERIAL and Primary Key
Date: 2008-02-29 20:28:11
Message-ID: 20080229202811.c8711c15@mail.allcoast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

CREATE TABLE "fav5"."batchnumber" (
"batchnumberid" SERIAL NOT NULL,
"processtype" SMALLINT NOT NULL,
"termloc" CHAR(3) NOT NULL,
"batchno" INTEGER NOT NULL
) WITHOUT OIDS;

With the above table definition, is batchnumberid by default also defined as the primary key or do I still need to define a separate Primary Key constraint?

Best Regards,

Michael Gould
All Coast Intermodal Services, Inc.
904-226-0978

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2008-02-29 20:53:39 Re: Removing Users and Revoking Privileges
Previous Message Martijn van Oosterhout 2008-02-29 20:26:18 Re: Removing Users and Revoking Privileges