Re: newbie question re: primary keys

From: "D(dot)Sanchez" <dsanchezREMOVE(at)bigpond(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: newbie question re: primary keys
Date: 2003-03-16 21:58:36
Message-ID: b52s2d$282t$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try using a sequence.

"duncanlovett" <duncanlovett(at)sbisolutions(dot)co(dot)uk> wrote in message
news:135af385(dot)0303140928(dot)641319c4(at)posting(dot)google(dot)com(dot)(dot)(dot)
> I have no choice in using postgre for a website i'm currently working
> on and have never used it before. I've used a bit of MySQL in the past
> and know the basics of SQL, enough to set up a db for what i wanted it
> for anyway.
>
> I've been trying to set up a table in postgre which is fine but when
> it comes to making the primary key auto increment i've got stuck. In
> MySQL i used Auto increment when setting up a table, that doesn't seem
> to exist on Postgre.
>
> So the question is, yes i know its got to be the simplest thing ever,
> how do i set up a table with an auto incrementing primary key?
>
> thanks in advance

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Houssay 2003-03-16 22:39:22 Data TYPE Creation
Previous Message Daniel Anderson 2003-03-16 12:54:58 Re: OOT-Does PostgreSQL has commercial level.