求整数的逆序数
程序员文章站
2024-01-31 09:00:28
...
整数逆序数 无 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
上一篇: phpcms2008与ucenter调整