MySQL숫자 함수FLOOR
CEIL

FLOOR숫자 함수

ROUND

내림한 정수를 반환합니다.

문법

FLOOR(x)

예제

아래 값을 입력하면 예제에 즉시 반영됩니다.

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