求整数的逆序数 2015/01/18 14026 DECLARE @INPUT BIGINT,@RESULT BIGINT SET @INPUT=1234 SET @RESULT=0 while @INPUT>0 BEGIN SET @RESULT=@RESULT*10+@INPUT%10 SET @INPUT=@INPUT/10 END SELECT @RESULT