[ LUGOS ] MySQL !?#

David Delibasic maddave na spider.y0u.net
Ned Nov 14 14:26:58 CET 1999


Hellow !

En question :
Torej.....naredis tabelo: create table test (id int not null
auto_increment,primary key (id),text text);

potem pa dodajam podatke v tabelo:
insert into test (text) values("hehe");
insert into test (text) values("hehe1");
insert into test (text) values("hehe2");
insert into test (text) values("hehe3");

tabela potem zgleda tako:
+----+-------+
| id | text  |
+----+-------+
|  1 | hehe  |
|  2 | hehe1 |
|  3 | hehe2 |
|  4 | hehe3 |
+----+-------+

Prva kolona se zaradi opcije AUTO_INCREMENT samodejno povecuje...
Potem pa zbrisem 3-ji vnos:
delete from test where id="3";
SELECT * FROM test;
+----+-------+
| id | text  |
+----+-------+
|  1 | hehe  |
|  2 | hehe1 |
|  4 | hehe3 |
+----+-------+

In sedaj bi rad da bi avtomatsko ko zbrisem eno vrsto da mi ne bi zbrisali
idja...da bi pi brisanji tabela zgledala tako:
+----+-------+
| id | text  |
+----+-------+
|  1 | hehe  |
|  2 | hehe1 |
|  3 | hehe3 |
+----+-------+
 
ne pa: 
+----+-------+
| id | text  |
+----+-------+
|  1 | hehe  |
|  2 | hehe1 |
|  4 | hehe3 |
+----+-------+

HELP !!!

lp, MadDave 




Dodatne informacije o seznamu Starilist