4.2.1.4 Numeric Functions
SELECT qty, ROUND(qty/2,0) "qty supplied"
FROM ord_items
WHERE item#='HW2';
Query 24 - Result:
Qty | ROUND(Qty/2,0) |
10 | 5 |
25 | 13 |
SELECT qty, TRUNC(qty/2,0) "qty supplied"
FROM ord_items
WHERE item#='HW2';
Query 25 - Result:
Qty | TRUNC(Qty/2,0) |
10 | 5 |
25 | 12 |
Examples of Numeric Functions
MOD(n,m) SQRT(n) ROUND(n,m) TRUNC(n,m) |
Leave a Comment