sql server 存储过程的简单使用
create procedure getUserName @userid int, @username varchar(30) output as begin select @username=name from person where id=@userid end --declare @username varchar(30) --exec getUserName 1 ,@username output --select @username; create proc findSomeUser(@begin int ,@end int) as begin select * from person where id between @begin and @end end --select name from exec findSomeUser 2,3;
posted on 2013-01-21 11:23 passer1991 阅读(132) 评论(0) 编辑 收藏 举报