Simon,

Thank you!  I have an odd ball case where the tables have two homes:  One is
a 'system' db one is a 'document' db.  Depending on the case, the user can
make changes to the document db, which in that case, needs the triggers, but
in the case where the system db is being recloned to the document db, the
triggers need to be off.

Sam

On Mon, Oct 3, 2011 at 4:51 AM, Simon Slavin <slav...@bigfraud.org> wrote:

>
> On 3 Oct 2011, at 4:12am, Sam Carleton wrote:
>
> > Ok, how do I list what a trigger is so that I can add it back once I want
> to
> > "reactive" it?
>
>
> To list all triggers:
>
> SELECT * FROM sqlite_master WHERE type='trigger'
>
> To list all triggers for a particular table:
>
> SELECT * FROM sqlite_master WHERE tbl_name='myTable'
>
> If you know the name of a trigger,
>
> SELECT * FROM sqlite_master WHERE name='myTrigger'
>
> To get just the text of the trigger and nothing else
>
> SELECT sql FROM sqlite_master WHERE name='myTrigger'
>
> to delete a trigger
>
> DROP TRIGGER myTrigger
>
> Warning: messing with TRIGGERs by disabling them should probably only be
> done when importing startup data.
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to