Sobes.tech
Junior — Senior

Batch category change for news

livecode

Task condition

It is necessary to compose an SQL query that:

  • selects all rows from the news table;
  • sets the category_id field to 1 for each found record;
  • implements pagination, for example, updating 10 records per run.
Select * from news where category_id = 1 limit 10 offset;
id title category_id user_id