August 12th, 2013, 11:52 AM
Concatonated autonumbers as primary key for relational database.
I know I may be about to ask a cardinal sin of requests however bare with me
I currently have a list of users stored in a table and each of these users can have multiple logs associated with them which all populate in another table using a log id as a primary key and the user id as the entity link.
I use a computed column to concatenate the two together.
E.g. So the concatenated logs look like
I would like to make a concatenated User-Log ID the primary key, and have the auto-increment reset dependant on the user id. So for example the table would actually look like this...
Is this possible or am I barking in the wrong park at the wrong tree?
August 12th, 2013, 04:52 PM
autonumbers subordinate to another column is supported by myisam tables (mysql) but not by sql server
by the way...
bear with me = have patience
bare with me = let's get undressed together