Pages
Home
Windows
Excel
Delphi
MySQL
Portable
Reflection
Sundries
TRUNCATE, Beheading Decimal Value
Syntax
: TRUNCATE(
decimal
,
digit
)
In
MySQL
,
truncate
function
is used
to
chop off
a decimal
fractions
Example
:
SELECT TRUNCATE(12.844556,3);
CEILING, Rounding Decimal Numbers (Up)
Syntax
: CEILING(
decimal
, d
igit
)
In
MySQL, the
Ceiling
function
used
to
round
up
a decimal
Example
:
SELECT CEILING(12.34) AS Pembulatan;
ROUND, Rounding Numbers Nearby
Syntax
:
ROUND(
decimal
,
digit
)
In
MySQL, the
Round
function
is used
to
round
a number
to the
nearest
value
Example
:
SELECT ROUND(12.84,1);
SELECT ROUND(12.844556,3);
FLOOR, Rounding Decimal Numbers (Down)
Syntax
:
FLOOR(
decimal
)
In
MySQL
,
Floor
Function
used
for
rounding
down
a decimal
Example
:
SELECT FLOOR12.84) AS Pembulatan;
Older Posts
Home
Subscribe to:
Comments (Atom)