Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3071061
  • 博文数量: 1412
  • 博客积分: 15478
  • 博客等级: 上将
  • 技术积分: 14938
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-23 16:08
文章存档

2016年(1)

2015年(17)

2013年(13)

2012年(103)

2011年(185)

2010年(261)

2009年(425)

2008年(363)

2007年(44)

分类: 数据库开发技术

2009-06-22 22:55:28

前面我们学了检索一个表中的一列或几列,如果我们的目标再具体一点,只检索一列中其中的一条,那就要写一个参数(即限定词)。它的一般写法叫形参,具体的内容叫实参。
 
create proc proc_studentScore2 @id int--(@id int为形参)
as
begin
 select * from studentScore inner join stuClasss on stuClass = claID
 inner join studentSubject on stuSubject = subID where stuID = @id
end
 
运行语句:
exec proc_studentScore2 1(1为实参)--只查第一条
 

 
阅读(498) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~