select a.mission_item1_num-c.item_num as num1 from mission a join shop b where.......我这边相减后得出了很长一段数字 这是怎么回事先谢谢了

解决方案 »

  1.   

    declare @a decimal(10,5),@b decimal (10,5)
    set @a=12.5423
    set @b=1.5421
    select @a-@b
    /*
    11.00020
    */
    楼主想要什么样的数字呢?
      

  2.   

    都是ini的
    出的数字很长大概是1841361545
    我本来就是0-2的样子
      

  3.   

    应该不会吧,是不是字段搞错了:
    declare @a int,@b int
    set @a=32
    set @b=28
    select @a-@b
    /*
    -----------
    4
    */
      

  4.   

    看player_id=1 的还有哪些任务未完成?select table2.item_id
    from table2 left join (
    select item_id
    from table1,table3
    where table1.mission_id=table3.mission_id
    and table1.player_id=1) t on table2.item_id=t.item_id
    where t.item_id is null
      

  5.   

    select cast(a.mission_item1_num as int)-cast(c.item_num as int) as num1 from mission a join shop b where....... 
    即可