RIMANENTE
Sintassi
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> REMAINDER[REMAINDER]:::quoted
REMAINDER --> End((END))
Scopo
La funzione SQL REMAINDER utilizza la funzione round nella sua formula, mentre la funzione MOD utilizza la funzione floor nella sua formula.
Vedi anche MOD.
Parametri:
- Numero 1 (
decimal): un numero. - Numero2 (
decimal): un numero diverso da 0; 0 genera un errore, così come la divisione per 0.
Restituisce: il resto.
Esempi
L'esempio seguente restituisce il resto della divisione tra 25 e 7; poiché 25 / 7 si arrotonda a 4, il resto è 25 - 4 * 7:
select remainder(25, 7)
-------------------
-3
L'esempio seguente restituisce il resto della divisione tra 1 e 2:
select remainder(1, 2)
-------------------
1