谢谢. 求助! 存储过程 中 小数点 问题........
如:表A字段money 值为:1000 表B 字段yumoney 值为:50.58用money - yumoney = 949.42 用存储过程怎么写
我是这么写的,但计算出的结果没有小数点
ALTER PROCEDURE ad_viewyumoney
(
@userid int
)
AS
declare @result money
declare @count money
declare @exist money
SET NOCOUNT ON
begin
set @count = (select [money] from addvalue where userid = @userid)
set @exist = (select sum(yumoney)as ymoney from keywords where userid = @userid)
set @result = @count-@exist
end
SET NOCOUNT OFF
RETURN @result