Re: help with serial type - Mailing list pgsql-general

From Poul L. Christiansen
Subject Re: help with serial type
Date
Msg-id Pine.GSO.4.21.0104261630410.26056-100000@borg.cs.auc.dk
Whole thread Raw
In response to help with serial type  (Jason <gee308@mediaone.net>)
List 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




pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Inheritance in 7.1
Next
From: Peter Eisentraut
Date:
Subject: Re: configure on a P4?