Concept Flow - ABS and MOD functions
Input number
ABS
Output result
The flow starts with an input number, then chooses ABS or MOD function. ABS returns the absolute value, MOD returns the remainder of division, then outputs the result.
SELECT ABS(-7) AS abs_val, MOD(17, 5) AS mod_val;
| Step | Function | Input | Calculation | Result |
|---|---|---|---|---|
| 1 | ABS | -7 | Absolute value of -7 | 7 |
| 2 | MOD | 17, 5 | 17 divided by 5 is 3 remainder 2 | 2 |
| 3 | END | - | - | - |
| Variable | Start | After ABS | After MOD | Final |
|---|---|---|---|---|
| abs_val | NULL | 7 | 7 | 7 |
| mod_val | NULL | NULL | 2 | 2 |
ABS(number): Returns the absolute (positive) value of number. MOD(number, divisor): Returns remainder after dividing number by divisor. Use ABS to remove negative sign. Use MOD to find leftover after division. Both return numeric results. Example: ABS(-7)=7, MOD(17,5)=2.
ABS(-15) return?MOD(17, 5) is correct syntax.SELECT ABS(-7) + MOD(20, 6) AS result;
SELECT ABS(10, -5) FROM dual;
numbers where the absolute value of value is less than 10 and the remainder when value is divided by 3 is 1. Which SQL WHERE clause is correct?Pass the test and this pattern moves unknown