当前位置: 代码迷 >> Sql Server >> 求教一个SQL转换有关问题
  详细解决方案

求教一个SQL转换有关问题

热度:20   发布时间:2016-04-27 18:53:56.0
求教一个SQL转换问题
如何用SQL语句在SQL   SERVER中把一个负数转换成无符号整型
如:-1920056908   转成   2374910388

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

set @x=-1920056908
select case when @x <0 then [email protected]
else @x end as result

set @x=920056908
select case when @x <0 then [email protected]
else @x end as result
  相关解决方案