整数逆序数 无 DECLARE @INPUT BIGINT,@RESULT BIGINTSET @INPUT=1234SET @RESULT=0while @INPUT0BEGINSET @RESULT=@RESULT*10+@INPUT%10SET @INPUT=@INPUT/10ENDSELECT @RESULT
整数逆序数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