SQLite Forum

Sqlite3 Trigger
Login
How do you know that you are inserting a value of 0 into Pruefung.theorie?  If the value is not 0 then the trigger will never execute the RAISE(ABORT ...).

There is no such type as "boolean" and you have no constraints on this field so your could insert whatever you want in it without raising an error, as long as the value inserted is NOT NULL, as that is the ONLY constraint on its value.

In other words there is nothing to ensure that you are not trying to insert the text string 'bloody well not!', which would NEVER equal 0 and the trigger would NEVER actuate (this is true of all column affinities so if you REQUIRE a specific value(s) you should make sure that the value meets your requirement).

You also do not mention which version of SQLite3 you are using as there have been changes in the past several years with regard to when column affinities are applied and checked.