ChrisB: mysql INSERT ... SELECT problem

Beitrag lesen

Hi,

Du kannst unter MySQL nicht gleichzeitig eine Tabelle verändern *und* abfragen, dein Statement sollte also eine Fehlermeldung produzieren.

Nicht in halbwegs aktuellen Versionen - siehe http://dev.mysql.com/doc/refman/5.0/en/insert-select.html:

The target table of the INSERT statement may appear in the FROM clause of the SELECT part of the query. (This was not possible in some older versions of MySQL.)

MfG ChrisB

--
“Whoever best describes the problem is the person most likely to solve the problem.” [Dan Roam]