sql - Is it possible to JOIN on the NEW/OLD tables inside a trigger -


i want join incoming data (in new virtual table) other database tables inside instead of insert trigger. possible in sqlite?

pseudo-ish code:

 create trigger vtablec_oninsert instead of insert on vtablec begin   insert tablea (column1, column2)  select     new.column1,     b.column2     tableb b          join      new n         on b.vtablec_id = n.id  end 

i tried, error: "no such table: main.new".

i guess answer no, since according docs sqlite supports each row triggers, there's no virtual new table, array of fields each iteration.


Comments

Popular posts from this blog

mysql - How to insert just year and month into date field? -

mod rewrite - Doing external redirect. .htaccess NS flag not working. How to achieve similar results? -