There are four ways to complement an integer to two decimal points in Oracle: using the TO_CHAR() function, using the LPAD() and SUBSTR() functions, using the TO_NUMBER() and TRUNC() functions, or using ROUND( ) function.
How to add two decimal points to an integer in Oracle
To add two decimal points to an integer in Oracle , you can use the following methods:
Method 1: Use function TO_CHAR()
1 |
|
Method 2: Use function LPAD()
and SUBSTR()
1 |
|
1 |
|
Method 3: Use the functions TO_NUMBER()
and TRUNC()
1 |
|
1 |
|
Method 4: Use the function ROUND()
1 |
|
1 |
|
The above methods can add two decimal points to the integer . Just choose the method that best suits your needs.
The above is the detailed content of How to express an integer with two decimal points in Oracle. For more information, please follow other related articles on the PHP Chinese website!