From: Arne Weiner <aswr@gmx.de>
To: pgsql-sql@postgresql.org
Subject: Re: Create table syntax
Date: Thu, 30 Aug 2001 19:39:54 +0200
Message-ID: <3B8E7A6A.4763DF1E@gmx.de> (raw)
References: <20010828071121.1863.qmail@mailweb22.rediffmail.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: aswr@gmx.de
Subject: Re: Create table syntax
In-Reply-To: <3B8E7A6A.4763DF1E@gmx.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox