oORaZvANOo Posted April 27, 2015 Report Share Posted April 27, 2015 Salut imi poate spune cineva comanda prin care deletez din mysql randul cu cea mai mica valoare la id ? Quote Link to comment Share on other sites More sharing options...
QUADMACHINE Posted April 27, 2015 Report Share Posted April 27, 2015 Parca asa se face, nu sunt sigur.DELETE FROM `tabel` WHERE `coloana` = (SELECT MIN(`coloana`) FROM `tabel` ORDER BY `coloana` DESC LIMIT 1)) Quote Link to comment Share on other sites More sharing options...
EAdrian Posted April 27, 2015 Report Share Posted April 27, 2015 ^ n-ai nevoie de where Quote Link to comment Share on other sites More sharing options...
Gio33 Posted April 27, 2015 Report Share Posted April 27, 2015 DELETE FROM tabel ORDER BY id ASC LIMIT 1 Quote Link to comment Share on other sites More sharing options...
Reckon.. Posted April 27, 2015 Report Share Posted April 27, 2015 DELETE FROM tabel WHERE id <2; Quote Link to comment Share on other sites More sharing options...
EAdrian Posted April 27, 2015 Report Share Posted April 27, 2015 DELETE FROM tabel WHERE id <2;?i dac? în tabel cel mai mic `id` este 10 ? 1 Quote Link to comment Share on other sites More sharing options...
Goke Posted April 27, 2015 Report Share Posted April 27, 2015 e greu sa cauti putin a ?mysql - Deleting record with lowest ID - Stack Overflow Quote Link to comment Share on other sites More sharing options...
oORaZvANOo Posted April 27, 2015 Author Report Share Posted April 27, 2015 Mersi tuturor Quote Link to comment Share on other sites More sharing options...