ID EN
Mathematical Functions

ABS(X)

MySQL 8.4 🇮🇩 Bahasa Indonesia

Mengembalikan nilai absolut X, atau NULL jika X adalah NULL.

Syntax

MYSQL
SELECT ABS(2);
2
SELECT ABS(-32);
32

Contoh

Example

The result type is derived from the argument type. An implication of this is that ABS(-9223372036854775808) produces an error because the result cannot be stored in a signed BIGINT value.

MYSQL
SELECT ABS(2);
2
SELECT ABS(-32);
32