timothy: (MySQL) -> Letzten 40 Eintraege verschieben in andere Tabelle

Beitrag lesen

Hi folks

mysql> INSERT INTO aaa VALUES (id,foo,bar,test,cool) SELECT (id,foo,bar,test,cool) FROM bbb order by id desc limit 40,1000000;

<cite>
INSERT [LOW_PRIORITY] [IGNORE] [INTO] tabelle [(spalten_liste)] SELECT ...
</cite>

also

INSERT INTO aaa (id, ...) SELECT ...

Laß mal das "Values" weg.
Und überdenke Dein Limit.

Gruß
timothy