GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing university.voltdb.com — ROUND() Using VoltDBROUND()ROUND() — Returns a numeric value rounded to the specified decimal place SynopsisROUND( numeric-value, rounding-position ) DescriptionThe ROUND() functions returns the input value rounded to the specific decimal place. The result is returned as a DECIMAL value. The numeric-value argument must be a FLOAT or DECIMAL value. The rounding-position argument must be an integer between 12 and -25 and indicates the place to which the numeric value should be rounded. Positive values indicate a decimal place; for example 2 means round to 2 decimal places. Negative values indicate rounding to a whole number position; for example, -2 indicates the number should be rounded to the nearest hundred. A zero indicates that the value should be rounded to the nearest whole number. Rounding is performed using "banker's rounding", in that any fractional half is rounded to the nearest even number. So, for example, if the rounding-position is 2, the value 22.225 is rounded to 22.22, but the value 33.335 is rounded to 33.34. The following list demonstrates some sample results.
ExamplesThe following example uses the ROUND() function to return a DECIMAL value, rounding the value of the budget column to two decimal places. SELECT country, ROUND(budget,2) AS annual_budget
FROM world_economy ORDER BY country; | ||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |