|
Posted by J.O. Aho on 08/18/06 15:39
Flaming Corncob wrote:
> Ok, I just don't understand it.. what are the practical uses of indexes,
> AUTO_INCREMENT etc.. how are they supposed to work?
The sql server will take care of the increment of the value, without you need
first check up whats the highest value, then add one to it and then insert the
new data to the table. This can lead to that more than one will try to insert
data with the same value, which leads to problems.
With the auto increment, you don't need to insert the value when you insert
data into your table, it will automatically be inserted and adjusted, and no
risk for two to get the same value.
This is useful when you want to give unique id-numbers for all rows in a table.
//Aho
Navigation:
[Reply to this message]
|