select abs(-5) from dual; select bin(10) from dual; # 转二进制 1010 select hex(100) from dual; select conv(number,from_base,to_base) select ceil(n) select floor(n) select format(n,保留小数位) select least(n1,n2,...) select mod(10,4) from dual; # module select rand() # [0,1) select rand(seed) # seed不变,结果不变
https://dev.mysql.com/doc/refman/8.0/en/mathematical-functions.html