|
|
ru.perl- RU.PERL ---------------------------------------------------------------------- From : Eugene Bodin 2:5020/400 03 Jun 2001 14:56:45 To : All Subject : Re: Re[2]: perl+MySQL -------------------------------------------------------------------------------- Hello Sergey, Sergey Tkachuk <Sergey.Tkachuk@p50.f33.n5040.z2.fidonet.org> wrote: ST> AK> Лучше делать auto_increment, но mysql плохо поступает делая их не ST> AK> инкpементными, а пеpвый из незанятых номеpов. Т.е. если из таблицы ST> AK> что-то удаляли, то новая вставленная запись может не иметь наибольший ST> AK> номеp. ST> ST> Это уже давно не так. Hасколько давно? == begin == This is a manual for *MySQL*. This version is about the 3.23.10-alpha version of *MySQL*. [skip] * An integer column may have the additional attribute `AUTO_INCREMENT'. When you insert a value of `NULL' (recommended) or `0' into an `AUTO_INCREMENT' column, the column is set to `value+1', where `value' is the largest value for the column ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ currently in the table. `AUTO_INCREMENT' sequences begin with `1'. *Note `mysql_insert_id()': mysql_insert_id. If you delete the row containing the maximum value for an `AUTO_INCREMENT' column, the value will be reused with an ISAM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ table but not with a MyISAM table. If you delete all rows in the table with `DELETE FROM TABLE' (without a WHERE), the sequence starts over. [skip] == end == Best regards, Eugene --- ifmail v.2.15dev5 * Origin: Home (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.perl/152365c1b938.html, оценка из 5, голосов 10
|