vendredi 11 mars 2016

Why this query doesn't update only the lowest number?

Sqlite:

update spooler_stampa set rowid =  (select rowid from spooler_stampa order by rowid desc limit 1)  + 1  where rowid= (select rowid from spooler_stampa order by rowid asc limit 1) ;

I need to to this:

rowid
1
2
3

1 become 4

then i will have:

2
3
4

What is the correct query?

Thank you

Aucun commentaire:

Enregistrer un commentaire