mysql ROUND() function


  Translation results:

英[raʊnd] 美[raʊnd]

adj. Round; arc-shaped; plump, fat; integer

adv. Everywhere; around; roundabout ; in the opposite direction

prep.approximately; around, surrounding; (indicating position) around; nearby

n. circle, circle; cycle; round object, spherical object; (Meeting) One round

vt.& vi. Make a circle; go around; turn around; round...

Third person singular: rounds Plural: rounds present participle : rounding Past tense: rounded Past participle: rounded Comparative: rounder Superlative: roundest

mysql ROUND() functionsyntax

Function: Used to round numerical fields to the specified number of decimal places.

Syntax: SELECT ROUND(column_name,decimals) FROM table_name

##Parameters:

ParameterDescriptioncolumn_name Required. The field to round. decimals Required. Specifies the number of decimal places to be returned.

mysql ROUND() functionexample

//把名称和价格舍入为最接近的整数。
SELECT ProductName, ROUND(UnitPrice,0) as UnitPrice FROM Products;

Popular Recommendations