lundi 25 janvier 2016

sqlite: How to add a counter to an existing table

This is an sqlite specific question. I have a table x0 and would like to add a counter:

ALTER TABLE x0 ADD counter INTEGER;
UPDATE x0 SET counter = ?

With ? something like: @counter := @counter +1.

Any idea?

Aucun commentaire:

Enregistrer un commentaire