Re: NextNumbers Tables

From: stu <>
Date: Mon, 10 Feb 2003 16:05:27 -0000
Message-ID: <b28ims$phi$1$>

"Alan Gutierrez" <> wrote in message news:1XO1a.20790$
> I don't know if you are listening but, don't use a next number. Find a
> a natural primary key.

Why? My uni teacher used to say always use a surrogate key. It stops you from duplicating keys later. What advantages does it have over using IDs?

>If you absolutely cannot find one, use the
> sequence facilities provided by your db. Now you are going to have to
> find some other way to check for duplicate entries in your database. If
> there is no sequence facility provided by your db, get a different db.

I wish! DB2 as/400 dont have ID.

> If you cannot get a different db then do this:
> --
> Alan Gutierrez -
Received on Mon Feb 10 2003 - 17:05:27 CET

Original text of this message