SQL Basic
SQL Advanced
SQL Functions
| SQL round() |
The ROUND() FunctionThe ROUND() function is used to round a numeric field to the number of decimals specified. SQL ROUND() Syntax
SQL ROUND() ExampleWe have the following "Products" table:
Now we want to display the product name and the price rounded to the nearest integer. We use the following SELECT statement:
The result-set will look like this:
|
SQL round()