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

Reply via email to