|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
mysql default insertion order
Hi,
I usually have an auto_incremented primary key as my tables. And, usually, when I insert into these tables, mySQL adds the new row to the end, so that this primary key will be sorted ascending. However, it seems that once in a while mySQL inserts the item at random. Is there a reason that this happens? Thanks. |
|
#2
|
|||
|
|||
|
RE: mysql default insertion order
If you delete one of the rows, the next row insert might try to take it's value I think. Like if you had 16 rows, and you deleted row number 13, it might go into row 13.
I'm not sure if this is what you mean though? |
|
#3
|
|||
|
|||
|
RE: mysql default insertion order
Yes, I think that might be one of the reasons... it's very weird, though.
I think I'll just play it safe from now on and sort by asc on the primary column by default when I select data out. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > mysql default insertion order |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|