Home > Database > Mysql Tutorial > 求整数的逆序数

求整数的逆序数

WBOY
Release: 2016-06-07 14:55:04
Original
1372 people have browsed it

整数逆序数 无 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
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template