Either the number is a unique key (like a customer number):
- it is essential not to change it! (I use AI = Auto increment = Integer when I create a table)
- it is essential to use this ID for all actions (imagine you have 2 persons called Peter Smith -> which one is it? -> they have different ID's ->easy)
OR
- it's just a numbering while displaying
- then number it on the Screen if you like
- don't use it as a key! (you have the uniqued ID for that)
Updating any row will be done by using the unique ID only. This is safe and very easy
Generally:
- each object hast to be identified by a unique identifier
- so spend every object (like person, customer, item, order, etc.) a unique identifier
So if you want to update an item's Price you use the id: Update xxxx Set Price = NewPrice Where ID=ItemID
PS: ID is an reserved word so call it CustomerID f.e.