Learn how to use the ROUND , TRUNC and MOD function in oracle sql.
ROUND function is used when you need to round decimal number to the closest one.
ROUND Examples:
SELECT ROUND(45.923,2), ROUND(45.923,0),
ROUND(45.923,-1)
FROM DUAL;
TRUNC function is required when you need to remove part of the decimals without rounding it.
TRUNC Exampl:
SELECT TRUNC(45.923,2), TRUNC(45.923),
TRUNC(45.923,-2)
FROM DUAL;
MOD function is used to calculate the remainder number.
The MOD function is often used to determine if a value is odd or even.
MOD Example:
SELECT MOD(5 ,2 ),
MOD(1600 , 300 )
FROM DUAL;
Another MOD Example:
SELECT last_name, salary, MOD(salary, 5000)
FROM employees
WHERE job_id = 'SA_REP';
Chapters:
00:00 Intro
00:17 ROUND function.
02:59 TRUNC function.
04:52 MOD function.
05:52 MOD example more explanation.
06:57 Example 2 MOD function.
✅ Oracle database download link:
https://www.oracle.com/kw/database/te...
✅ To install sample database on you database, please check this video:
• How to install Oracle Sample Database sche...
✅ website:
https://erpscope.com/
✅ How to become oracle expert Article:
https://erpscope.com/how-to-become-or...
✅ linkedin : / posts
✅Facebook: / erpscope
✅ Twitter: / erp_scope
✅Instagram: / erp_scope
In questa pagina del sito puoi guardare il video online Learn how to Round numbers in oracle SQL, [ ROUND TRUNC MOD functions ] [SQL Tutorial] della durata di ore minuti seconda in buona qualità , che l'utente ha caricato ERP Scope 15 agosto 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 356 volte e gli è piaciuto 1 spettatori. Buona visione!