Skip site navigation (1) Skip section navigation (2)

Re: Create table syntax

From: wsheldah(at)lexmark(dot)com
To: "satish rao " <csr_del(at)rediffmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Create table syntax
Date: 2001-08-31 14:58:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general

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
non-alpha characters.

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 website, I think there may be some tools or articles that
would also be helpful.

Good luck!

"satish rao " <csr_del%rediffmail(dot)com(at)interlock(dot)lexmark(dot)com> on 08/28/2001
02:52:36 AM

To:   pgsql-general%postgresql(dot)org(at)interlock(dot)lexmark(dot)com
cc:    (bcc: Wesley Sheldahl/Lex/Lexmark)
Subject:  [GENERAL] Create table syntax


Entered below is the SQL create table syntax:

     [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
correct syntax.

Hoping for a positive response from ur side.


Satish Rao

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

pgsql-general by date

Next:From: wsheldahDate: 2001-08-31 15:01:56
Subject: Re: Apache authentication
Previous:From: wabi youssoufDate: 2001-08-31 14:52:30
Subject: handling results of pl/pgsql functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group