Possible Duplicate:
Mysql error 1093 - Can’t specify target table for update in FROM clause
I am getting an error when putting SELECT query in WHERE clause of UPDATE query.
my Query is like this :
UPDATE `subschedulesseats` m
SET m.studentid='1'
WHERE m.`seatid`= (
SELECT h.`seatid`
FROM `subschedulesseats` h
WHERE h.`sessiontime`='02:30~04:00'
ORDER BY h.`seatid` ASC
LIMIT 2,1
)
AND Error will be shown is like this :
"You can't specify target table 'm' for update in FROM clause"
I have attached a snap shot of the error display.
Please anyone can help me in this problem?
Thank You in Advance