6

I want to create a update trigger,

can I create a variable betweent "BEGIN" and "END" , and set value by query from a select sql statement ?? And then execute "if" "else" statement by judging this variable

waiter.james
  • 591
  • 2
  • 6
  • 16

1 Answers1

3

As an embedded database, SQLite is designed to be used directly from another programming language, so it does not have programming constructs like variables or IF statements.

If it is not possible to implement your logic with the trigger's WHEN clause or subqueries, you have to do this in Java (i.e., without a trigger).

CL.
  • 173,858
  • 17
  • 217
  • 259