sqlite> CREATE TRIGGER "NewTrigger" AFTER INSERT ON "runRecord"
BEGIN
update user set totalDistance =totalDistance+new.runningDistance where username=new.username;
END
;;(这里注意!!!;;)
sqlite> CREATE TRIGGER "NewTrigger" AFTER INSERT ON "runRecord"
BEGIN
update user set totalDistance =totalDistance+new.runningDistance where username=new.username;
END
;;(这里注意!!!;;)