MySQLNumeric FunctionsRAND
LOG10

RANDNumeric Functions

SIGN

Returns a random floating-point value between 0 and 1.

Syntax

RAND([seed])

Example

Enter values below to update the example in real time.

product_name
products
-- 랜덤 상품 5개 추천
SELECT product_name
FROM products
ORDER BY RAND()
LIMIT 5;