On 20 Sep 2015, at 11:13pm, James Hartley <jjhartley at gmail.com> wrote:

> As I look at the flowchart for triggers at the following:
> 
> https://www.sqlite.org/lang_createtrigger.html
> 
> It appears that the body of a trigger must specify some kind of statement.
> 
> I ask because I am wanting to log all activity on another table.  I can
> successfully do this with triggers.  What I am curious to do is disable
> UPDATE's & DELETE's on the log tables themselves.

You can create TRIGGERs which operate BEFORE, AFTER or INSTEAD OF.  So perhaps 
just create an INSTEAD OF trigger which does nothing.  Perhaps a SELECT command 
or a DELETE command with a WHERE clause which is never satisfied (e.g. rowid < 
0).

Then your next concern is over how to zero-out the log if you really needed to 
do that.

Simon.

Reply via email to