第1个回答 2011-06-14
--[例7.1]不带参的
use pxscj
go
create procedure student_info
as
select *
from cjb
where xh='081101'
go
--[例7.2]带参的
use pxscj
go
create procedure student_info1 @name char(8),@cname char(16)
as
select a.xh,xm,kcm,cj,t.xf
from xsb a inner join cjb b
on a.xh=b.xh inner join kcb t
on b.kch=t.kch
where a.xm=@name and t.kcm=@cname
go
execute student_info1 '王林','计算机基础'