> I never knew this was possible.  even then, under what
> circumstances would someone do it that way?

How about in a link/join table.

USER
--USER_ID (PK)
--USER_NAME

ROLE
--ROLE_ID (PK)
--ROLE_NAME

USER_ROLE_LINK
--USER_ID (PK)
--ROLE_ID (PK)

In the USER_ROLE_LINK table you can use the combination of USER_ID and
ROLE_ID as the PK or add another column and make that the PK but be sure to
add a unique constraint on the USER_ID and ROLE_ID.

It has applications... Especially if a table has a PK made up of many
columns and you don't want to pass all of them around for updates and
deletes, etc...

Mike
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to