日期:2014-05-18  浏览次数:20417 次

求教一个SQL转换问题
如何用SQL语句在SQL   SERVER中把一个负数转换成无符号整型
如:-1920056908   转成   2374910388

------解决方案--------------------
declare @x bigint

set @x=-1920056908
select case when @x <0 then 4294967296+@x
else @x end as result

set @x=920056908
select case when @x <0 then 4294967296+@x
else @x end as result