Re: help with serial type

From: "Poul L(dot) Christiansen" <poulc(at)cs(dot)auc(dot)dk>
To: Jason <gee308(at)mediaone(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: help with serial type
Date: 2001-04-26 14:33:40
Message-ID: Pine.GSO.4.21.0104261630410.26056-100000@borg.cs.auc.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 25 Apr 2001, Jason wrote:

> Hi , I'm a postgreSQL newbie. I have a table called "atable" that has
> the columns:
> title varchar(20)
> name varchar(20)
> id serial
> if I do:
> INSERT INTO TABLE atable VALUES('SQL1','Jason')
> the 'id' gets updated with a new number automatically. I then later
> added a new column called 'date'. Now if I do an insert with:
> INSERT INTO TABLE atable VALUES('SQL2','Toy','',date('now'))

Use:
INSERT INTO atable
(title,name,date)
VALUES('SQL2','Toy',date('now'));

I don't know if you can name a column "date" because I think it's a
reserved word.

Poul L. Christiansen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Wood 2001-04-26 14:37:01 Re: help with serial type
Previous Message psycle 2001-04-26 14:32:43 Scalability Supported ?