declare @a decimal(10,5),@b decimal (10,5) set @a=12.5423 set @b=1.5421 select @a-@b /* 11.00020 */ 楼主想要什么样的数字呢?
都是ini的 出的数字很长大概是1841361545 我本来就是0-2的样子
应该不会吧,是不是字段搞错了: declare @a int,@b int set @a=32 set @b=28 select @a-@b /* ----------- 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
select cast(a.mission_item1_num as int)-cast(c.item_num as int) as num1 from mission a join shop b where....... 即可
set @a=12.5423
set @b=1.5421
select @a-@b
/*
11.00020
*/
楼主想要什么样的数字呢?
出的数字很长大概是1841361545
我本来就是0-2的样子
declare @a int,@b int
set @a=32
set @b=28
select @a-@b
/*
-----------
4
*/
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
即可