I'm not sure about all the square brackets around field names and types, but I
have a hunch they should either be converted to double quotes or left out
altogether. Double quotes are needed if any field names have spaces or other
Instead of IDENTITY (1, 1), use SERIAL, as follows:
listid int SERIAL NOT NULL ,
If you run the statement from the psql command line utility, you'll need a
semicolon after the final right paren; it acts like "GO" does in MS SQL Server.
Looks like you're converting from SQL Server, no? Check the techdocs section on
the postgresql.org website, I think there may be some tools or articles that
would also be helpful.
"satish rao " <csr_del%rediffmail(dot)com(at)interlock(dot)lexmark(dot)com> on 08/28/2001
cc: (bcc: Wesley Sheldahl/Lex/Lexmark)
Subject: [GENERAL] Create table syntax
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
postgresql while creating the table and the
autoincrement option for the column(listid). If this
syntax is not correct for postgresql, we need the
Hoping for a positive response from ur side.
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
pgsql-general by date
|Next:||From: wsheldah||Date: 2001-08-31 15:01:56|
|Subject: Re: Apache authentication|
|Previous:||From: wabi youssouf||Date: 2001-08-31 14:52:30|
|Subject: handling results of pl/pgsql functions|