How can I assign a unique id to each database user when I create them.
Printable View
How can I assign a unique id to each database user when I create them.
What are you trying to do?
I want to give a unique id (9 digits) for each of the user when I create a user in the database
I don't think its going to be possible unless embedding the 9 digits into username is a viable option.
I guess I meant "What's the business case for assigning a unique nine digit number to each user"?
I wonder whether a system trigger on CREATE USER is possible, that would populate a user_id table with such a number?
On the other hand, maybe it's possible to apply a function to the username string to deterministically turn it into a number?
+1 for "what's the business case?", though.