I a table like this:
date time user data
131111 111111 Mike 23
131111 121212 Linda 12
131111 131323 Mike 45
I want to add a field called "userID", based on the existing data in the DB:
date time user userID data
131111 111111 Mike 1 23
131111 121212 Linda 2 12
131111 131323 Mike 1 45
As long as the userID is one-on-one mapping to an existing user, it would be fine.
It would be better if it starts from 1 to #ofUsers.
Is there a clean solution?