--有输入参数的存储过程--
create proc GetComment
(commentid int)
as
select * from Comment where CommentID=commentid
--有输入与输出参数的存储过程--
create proc GetCommentCount
newsid int,
count int output
as
select count=count(*) from Comment where NewsID=newsid
--返回单个值的函数--