开发者

Trigger after select

I have a sqlite3-database. There's a table with some logs. These logs are readed by a tool and were writed to a text-file (or something else) by it.

After this, the logs can be deleted. Is it possible to create a trigger in sqlite3 after a select, which automaticly deletes the logs?

Like this:

CREATE TRIGGER after_select_x
AFTER SELECT ON x
BEGIN
  DELETE FROM x WH开发者_StackOverflowERE id = selected.id;
END;

But this doesn't work.

Thanks

Best regards


There is no such a thing as "Trigger after select". Check out the Trigger syntax reference.

I suggest you use a wrapper function to perform every select statement in your application, and handle the logs in that function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜