Results 1 to 6 of 6
Jan 15, 2005, 03:23 #1
- Join Date
- Jul 2002
- 0 Post(s)
- 0 Thread(s)
Error with using the same table in an UPDATE clause
When I try the following query:
UPDATE polls p1
SET p1.votes4 = (p1.votes4 + 1)
WHERE p1.id = (
FROM polls p2
I get this error:
#1093 - You can't specify target table 'polls' for update in FROM clause
Is it really not possible, to use the same table to get some info? But how can I otherwise find that info, that I need in the UPDATE clause?
I've found a workaround, but it uses two queries.