I have a couple of tables in a SQL 2008 server that I need to generate unique ID’s for. I have looked at the ‘identity’ column but the ID’s really need to be unique and shared between all the tables.
So if I have say (5) five tables of the flavour ‘asset infrastructure’ and I want to run with a unique ID between them as a combined group, I need some sort of generator that looks at all (5) five tables and issues the next ID which is not duplicated in any of those (5) five tales.
I know this could be done with some sort of stored procedure but I’m not sure how to go about it. Any ideas?
Why not use a GUID?