Rune Zedeler
2007-06-21 13:20:20 UTC
I need to insert a unique value into a (not auto-increment) column.
I try
insert into idtest (val) values ((select max(val) from idtest)+1);
but I get
ERROR 1093 (HY000): You can't specify target table 'idtest' for update
in FROM clause
- what is the correct way to do this?
Regards,
Rune
I try
insert into idtest (val) values ((select max(val) from idtest)+1);
but I get
ERROR 1093 (HY000): You can't specify target table 'idtest' for update
in FROM clause
- what is the correct way to do this?
Regards,
Rune