UPDATE reservation SET flag = "1" WHERE ipAddress = (SELECT ipAddress FROM reservation WHERE endDate < CURRENT_TIMESTAMP);
Im trying to use this query for changing flag column of those entries in reservation table whose date has expired. The flag column is by default 0. so im trying to change expired once to 1 for my identification.
Im getting the following error.
ERROR 1093 (HY000): You can't specify target table 'reservation' for updatein FROM clause
Can someone suggest a solution to this problem..