MySQLNumeric FunctionsFLOOR
CEIL

FLOORNumeric Functions

ROUND

Returns the largest integer not greater than x (floor).

Syntax

FLOOR(x)

Example

Enter values below to update the example in real time.

customer_id
total_spend
points
customers
-- 적립 포인트 내림 계산
SELECT customer_id, FLOOR(total_spend * 0.01) AS points
FROM customers;