this is what i am doing
update t1 set x=a,y=b where a and b are obtained from (select query here)
- i know the select query
- the select query returns multiple results which are the same
- when i use group by or distinct query execution slows down considerably
- a and b are forward references so mysql reports an error
- i want to set a equal to the value obtained in the first row and b equal to the value obtained in the first row for the respective columns, to avoid group by. i don't know how to refer to the first result from the select query.
how can i achieve all this?