jeudi 29 janvier 2015

DELETE using INNER JOIN sqlite

I'm trying to delete rows of table "eventos" in sqlite like this:



DELETE e FROM `eventos` AS e
INNER JOIN `noticias` AS n ON e.noticiasId=n.id
WHERE n.fechaExpiracion < DATE_SUB(CURDATE(), INTERVAL 1 MONTH)


I have the following error



android.database.sqlite.SQLiteException: near "e": syntax error


I´m not sure why I have this error, I thik that sqlite dont allows to use AS


Aucun commentaire:

Enregistrer un commentaire