标签:cti values practice log 相关 har 触发器 into name
构造一个触发器audit_log,在向employees_test表中插入一条数据的时候,触发插入相关的数据到audit中。
CREATE TABLE employees_test(
ID INT PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL,
AGE INT NOT NULL,
ADDRESS CHAR(50),
SALARY REAL
);
CREATE TABLE audit(
EMP_no INT NOT NULL,
NAME TEXT NOT NULL
);
create trigger audit_log after insert on employees_test
begin
insert into employees_test values(new.id,new.name);
end
标签:cti values practice log 相关 har 触发器 into name
原文地址:https://www.cnblogs.com/cya20calm-brave/p/13764748.html