数据库
首页 > 数据库> > SQL5

SQL5

作者:互联网

create trigger tri_stu_insert on tb_students for insert
as
print '嗷嗷';
go

insert into tb_courses(course_num,course_name,course_xf,course_des) values('10011005','高等数学',4,'席八');
select * from tb_students;

insert into tb_students(stu_num,stu_name,stu_sex,stu_age,stu_tel,stu_qq) values('2013030300','老王','男',38,'13939393399','654679879');

 


--行级触发器
--语句级触发器
create trigger tri_stu_del on tb_students for delete for delete
as
print '----';
go

delete from tb_students where stu_num='2013030300';
select * from tb_students where stu_age=15;
delete from tb_students where stu_age=15;

 

标签:insert,course,students,SQL5,stu,num,tb
来源: https://www.cnblogs.com/beiguang/p/15937016.html