数据库——存储触发器.sql
/*------存储1 根据用户输入该学生编号,检查是否存在,若存在则显示出*/ Create procedure p1 @sno char(10) ,@sname char(10),@ssex char(2),@borndate datetime,@classname varchar(50) As Begin If exists(select * from student2 where sno=@sno) Select * from student2 where sno=@sno Else Begin insert into student2 (sno,sname,ssex,born
用户评论