Re: Create table syntax - Mailing list pgsql-sql

From Arne Weiner
Subject Re: Create table syntax
Date
Msg-id 3B8E7A6A.4763DF1E@gmx.de
Whole thread Raw
In response to Create table syntax  ("satish rao " <csr_del@rediffmail.com>)
List pgsql-sql
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
theautoincremention. This Statement should do what you want.


Arne.


pgsql-sql by date:

Previous
From: Arne Weiner
Date:
Subject: Re: Help On Postgresql
Next
From: Stephan Szabo
Date:
Subject: Re: Create table syntax