【2018-01-19】Sql Server-存储过程

--存储过程


create proc JiaFa--创建加法存储过程
@a int,
@b int
as
  return @a+@b;

declare @ccc int;
exec @ccc=JiaFa 5,10--调用存储过程
select @ccc

 


create proc SelectAll--创建查询表存储过程
as
  select * from student
  select * from Score
  select * from Course
  select * from Teacher

exec SelectAll--调用存储过程

 

posted @ 2018-01-19 18:42  Int64  阅读(132)  评论(0编辑  收藏  举报