Daniel: verschachteltes MySQL-Query

Beitrag lesen

Ahoi _hkl,

=> "DELETE FROM tab1 WHERE kat_id NOT IN (SELECT id FROM kategorien);"
=> "COMMIT;"

ich hab MySQL 4.0.22

Es scheint dort nicht zu funktionieren. denn phpMyAdmin bringt:

--------------------------------------
Fehler

SQL-Befehl: Dokumentation

DELETE FROM tab1 WHERE kat_id NOT IN (
SELECT id
FROM kategorien
)

MySQL meldet: Dokumentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT id
FROM kategorien
)' at line 2
---------------------------------------

bin grad in der Docu am schaun und rumprobieren ob ichs gelöst bekomm. Für hilfe bin ich trotzdem dankbar

MfG