I have an query:
update customers_training_malaysia set period_id = (select b.id from customers_training_malaysia a,training_schedules_malaysia b where a.sch_code=b.sch_code order by a,id) where sch_code = (select b.sch_code from customers_training_malaysia a,training_schedules_malaysia b where a.sch_code = b.sch_code order by a.id) I tried to run following query update, but I get only the error
more than one row returned by a subquery used as an expression
What shall I do to correct the sql query?