0

I'm using sqlte3.8.8, trying to create a trigger to clean old data. Here is the SQL that I put in:

CREATE TRIGGER "main"."NewTrigger" AFTER INSERT ON "historydata"
BEGIN
    delete from historydata where id in (select id from historydata order by id limit 100000);
  vacuum;
END;

But I got Syntax error on "vacuum;".However, it works fine in sqlite command line.

Is it the case that "vacuum" cannot be used in a trigger?

joe
  • 1,078
  • 2
  • 11
  • 30

1 Answers1

0

The documentation shows that only UPDATE/INSERT/DELETE/SELECT statements are allowed in a trigger body.

CL.
  • 173,858
  • 17
  • 217
  • 259