标签: sql sql-server-2005
我正在写这样的存储过程..
declare @avg float set @avg = select avg(rating) from videorating where videoid = 4
我能这样写吗?我可以将值存储在@avg中吗?
答案 0 :(得分:3)
我会写它
declare @avg float select @avg=avg(rating) from videorating where videoid = 4