pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Create table syntax
3+ messages / 3 participants
[nested] [flat]

* Create table syntax
@ 2001-08-28 07:11  satish rao  <csr_del@rediffmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: satish rao @ 2001-08-28 07:11 UTC (permalink / raw)
  To: pgsql-sql

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 
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.

Regards

Satish Rao



 




 






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Create table syntax
@ 2001-08-30 17:39  Arne Weiner <aswr@gmx.de>
  parent: satish rao  <csr_del@rediffmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Arne Weiner @ 2001-08-30 17:39 UTC (permalink / raw)
  To: 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
the
 autoincremention. This Statement should do what you want.


Arne.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Create table syntax
@ 2001-08-30 17:42  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: satish rao  <csr_del@rediffmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Stephan Szabo @ 2001-08-30 17:42 UTC (permalink / raw)
  To: satish rao <csr_del@rediffmail.com>; +Cc: pgsql-sql

On 28 Aug 2001, satish rao  wrote:

> 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)

create table lists (
 listid serial not null,
 listname varchar(200),
 listcreator varchar(200),
 listdesc text);

(You may want to make listid a primary key as well)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-08-30 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-08-28 07:11 Create table syntax satish rao  <csr_del@rediffmail.com>
2001-08-30 17:39 ` Arne Weiner <aswr@gmx.de>
2001-08-30 17:42 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>

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