I want to have two different tables in MS SQL, for example users and groups, both with identity column. It is possible to create auto increment over two identity columns? I want to have third table with common informations to these two tables and I want to identify unique record.
In Oracle is SEQUENCE.
It is possible to do it?
Thanks,
Martin Pilch
Afaik, SQL Server does not have a concept where you can use a named identity in multiple tables (cfr. Oracles
SEQUENCE)You have a few options to differentiate the data coming from both tables
If the design can’t be changed, using a GUID would be my choice of preference.