-1

I have a list of objects that only one of them can be selected. For this I have a column in this table (table of objects) that shows the status of the object (selected or not selected) I want to select the item to be clicked and change the status to the selected mode and uncheck the other items.

what is the solution in sqlite/sqflite flutter?

1 Answers1

0

I don't know Flutter. A conditional update in SQL can look like this:

update mytable set selected = case when id = 123 then 1 else 0 end;
Thorsten Kettner
  • 89,309
  • 7
  • 49
  • 73