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?
Edit 1:
I found an easy solution but not very flexible:
UPDATE x0 SET counter = ROWID;
But this is not very flexible. For example, if I want to count within groups like in this example with MySQL: count within groups.