From the course: Oracle Database 12c: Basic SQL

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using ROUND

Using ROUND - Oracle Database Tutorial

From the course: Oracle Database 12c: Basic SQL

Start my 1-month free trial

Using ROUND

- [Instructor] The Round SQL function allows us to round off digits following the decimal point of a number returned by a SQL query. Let's see it in action. Let's type select, and let's enter a constant value for our example this time. So I'll type 999.98765, from dual. Running the query as-is will return our constant value as-is. However, I can add the Round function, and inside brackets specifying the actual number, but this can also be value retrieved from a database table, comma, any number of digits I want to round to following the decimal point. So let's start with three. Let's run this query again, and as you see, the number was rounded to 999.988. Changing three to one will round the value completely, and changing one to two will round the value to two decimal points, so 999.99.

Contents