ChrisB: Mysql - Datensatz kopieren und Datum ändern

Beitrag lesen

Hi,

MySQL mag schon aus grundsätzlichen Gründen weder deine noch EKKis noch tomgks noch andere Versionen, die INSERT und ein SELECT auf die selbe Tabelle in einer Query vereinen. https://forum.selfhtml.org/?t=199108&m=1338630

http://dev.mysql.com/doc/refman/5.1/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.) However, you cannot insert into a table and select from the same table in a subquery.”

Bin mir gerade nicht sicher, wie das zu verstehen ist.
INSERT INTO tabelle SELECT ... FROM tabelle WHERE ...
müsste also nach der ersten Aussage inzwischen gehen, und nur die Verwendung echter Subqueries geht nicht ...?

MfG ChrisB

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