View Single Post
Old 10-09-2012, 01:51 PM   PM User | #6
guelphdad
Super Moderator


 
guelphdad's Avatar
 
Join Date: Mar 2006
Location: St. Catharines, Ontario Canada
Posts: 2,629
Thanks: 4
Thanked 147 Times in 138 Posts
guelphdad will become famous soon enoughguelphdad will become famous soon enough
Your solution however is not as good as OP's solution.
with the two column primary key, you will only have to enter the info in the prefix column and the autoincrement will start at 1 and increase for each prefix so you will end up with

ABC 1
ABC 2
DEF 1
DEF 2
DEF 3
GHI 1

and for your solution you will just have the autoincrement column increase indefinitely, it won't start at 1 for each of your different values in the prefix column, whereas his will.
guelphdad is offline   Reply With Quote