Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7UHWPf07390 for ; Thu, 30 Aug 2001 13:32:25 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f7UHU7q57603 for pgsql-sql@postgresql.org; Thu, 30 Aug 2001 13:30:07 -0400 (EDT) (envelope-from news) From: Arne Weiner X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Create table syntax Date: Thu, 30 Aug 2001 19:39:54 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 31 Message-ID: <3B8E7A6A.4763DF1E@gmx.de> References: <20010828071121.1863.qmail@mailweb22.rediffmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.2.18 i586) X-Accept-Language: en To: pgsql-sql@postgresql.org X-Archive-Number: 200108/369 X-Sequence-Number: 4628 satish rao wrote: > > Hi > > Entered below is the SQL create table syntax: > > CREATE TABLE lists ( > [listid] [int] IDENTITY (1, 1) NOT NULL , > [listname] [varchar] (200) NULL , > [listcreator] [varchar] (200) NULL , > [listdesc] [text] NULL) > > We need to know that this syntax will work properly in=20 > postgresql while creating the table and the=20 > autoincrement option for the column(listid). If this=20 > syntax is not correct for postgresql, we need the=20 > correct syntax. > CREATE TABLE lists ( listid SERIAL NOT NULL , listname varchar(200) NULL , listcreator varchar(200) NULL , listdesc text NULL); This create statement is accepted from postgres. The type SERIAL does the autoincremention. This Statement should do what you want. Arne.