Re: Primary Key: How Do I Generate One For Insert ...

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jim <REMOVEjimdon(at)sympatico(dot)caREMOVE>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Primary Key: How Do I Generate One For Insert ...
Date: 2002-08-06 18:46:24
Message-ID: 20020806114542.A85827-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 4 Aug 2002, Jim wrote:

> Hello,
>
> How do I generate a primary key (that is an INTEGER) to insert data into
> a table. Or do I need to know whats used?

If you want an autogenerated one (ie, you don't have values you want to
insert specifically), you probably want to look at serial and sequences.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message George.T.Essig 2002-08-06 18:46:57 Re: PostgreSQL + PHP 4.2x buggy with Apache?
Previous Message Stephan Szabo 2002-08-06 18:44:07 Re: Cannot use more than 16 attributes in an index