I have a trigger that I want to insert the same random value into two tables. How do I do this?
CREATE TRIGGER insertTrigger AFTER INSERT ON TableAB
BEGIN
INSERT INTO TableA(id, num) VALUES(RANDOM(), 1);
INSERT INTO TableB(id, num) VALUES(??, 1);
END;
I am not really using Random, but my own custom sqlite function which essentially does the same thing, but I need to remember that value to insert into TableB. How do I do that?