--创建成功的触发器
create trigger trig_insert
on population_tab
after insert
as
begin
declare @salary int;
select @salary = (select b.population from population_tab b
where b.pop_id = (select max(a.pop_id) from population_tab a));
if not exists (select * from salary_tab c where c.before_salary = @salary)
insert into salary_tab(before_salary,after_salary) values(@salary,@salary);
end
相关文章
- 03-31触发器
- 03-31EBS FORM中基本触发器
- 03-31zabbix触发器依赖
- 03-31Instead of 触发器
- 03-3125 触发器逻辑功能的分类
- 03-31Sql Service 存储过程、触发器
- 03-31关键字(6):trigger触发器
- 03-31sql update 触发器 可获得被update的行的信息
- 03-31数据库-触发器
- 03-31Jenkins常见的构建触发器