create proc Vote_Update
(
@vid int
)
as
set nocount on
declare @vpercent decimal(5,2)
set @vpercent=0.00
select @vpercent=Convert(int,(select sum(vote_num) from vote))
                          /
                          Convert(int
                                  ,(select top 1 vote_num from vote 
                                         where vote_id=@vid))
         print @vpercent
         set nocount off