SQL Numeric Functions
Mathematical functions — ROUND, ABS, CEIL, FLOOR, POWER, SQRT, MOD. This category documents 25 SQL numeric functions entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example tested against MySQL, PostgreSQL, SQL Server, and SQLite. The entries are: ROUND(), ABS(), CEIL() / CEILING(), FLOOR(), POWER() / POW(), SQRT(), MOD(), GREATEST() / LEAST(), RAND() / RANDOM(), SIGN(), TRUNCATE() / TRUNC(), LOG(), LOG10(), EXP(), PI(), DEGREES() / RADIANS(), SIN() / COS() / TAN(), ASIN() / ACOS() / ATAN(), POW() / POWER(), WIDTH_BUCKET(), ATAN2() / COT(), FORMAT() / ROUND() for Display, SQUARE() / CBRT(), LN(), CEILING vs ROUND vs TRUNC. Not sure where to start? ROUND() and ABS() are the most commonly used entries in this category. You can also search across every category from the search page, browse the complete A–Z index, or try any of these statements live in the SQL playground.