UPDATE forms SET
pos = (SELECT MIN(pos)-1 FROM forms)
WHERE id=$id
This doesn't work, error message:
**You can't specify target table 'form' for update in FROM clause**
I hope it's clear: I want to get the minimal element-1 from the same table and assign it to pos