Andre du Plessis <[EMAIL PROTECTED]> wrote:
I would like to know how to create an Autoincrement field and insure
that it is unique across the database, I tested this and it does not
seem to work:
I need this because I need a link table that wont know which table the
id comes from, and I cant add all the fields to make a compound key as
some of the values would then be blank.
I don't understand this last statement. What again prevents you from
having a table like this:
create table linkTable (infoId integer, inWhichTable integer, ...);
You can also play arithmetic tricks, like adding a large constant to all
IDs that come from temptable2 when storing them in linkTable.
If you insist on having non-repeating IDs through both tables, you can
write a set of triggers to achieve that.
Igor Tandetnik
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------