On Fri, 2 Oct 2009 10:43:38 +0200, Michael Werber
<[email protected]> wrote:

>hallo Sqlite-users,
>
>i want to update a trigger from within another trigger. because there is no
>update-trigger statement i tried to drop and recreate my trigger. i
>tried this:
>
>CREATE TRIGGER trg_update AFTER UPDATE ON SystemData
>BEGIN
>       DROP TRIGGER trg_TrimMessdataLast;
>
>       -- CREATE TRIGGER trg_TrimMessdataLast 
>       -- Statement omitted, it will follow here
>END;
>
>but i get: "near ´DROP´: syntax error"
>
>so the question is am i doing something wrong or 
>s it impossible to rop a trigger from within a trigger?

It is impossible to execute DDL (Data Definition Language)
from a trigger.

DDL = {CREATE|DROP} {TABLE|VIEW|TRIGGER|....}

Triggers can only execute DML (Data Manipulation Language).

DML = {SELECT|INSERT|UPDATE|DELETE}

The need to change a schema on the fly is usually caused by
bad design. What is the probvlem you try to resolve?
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to