Shilpa Sheoran <[EMAIL PROTECTED]>
wrote:
Does SQLite support declaring/using local variables in  a Trigger?

No.

If not what is the alternative?

CREATE TRIGGER trig1 AFTER INSERT ON table1
BEGIN
DECLARE num INTEGER;
SELECT COUNT(id) INTO num FROM table1;

INSERT INTO table2 (count) VALUES (num);
END;

insert into table2(count)
select cound(id) from table1;

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to