The SAP ASE server uses the following arithmetic operators:

Operator |
Meaning |
---|---|

+ |
Addition |

– |
Subtraction |

* |
Multiplication |

/ |
Division |

% |
Modulo (Transact-SQL extension) |

Addition, subtraction, division, and multiplication can be used on exact numeric, approximate numeric, and money type columns.

The modulo operator cannot be used on `smallmoney` or `money`
columns. Modulo finds the integer remainder after a division involving two whole numbers.
For example, 21 % 11 = 10 because 21 divided by 11 equals 1 with a remainder of 10.

In TSQL, the results of modulo has the same sign as the dividend. For
example:

1> select -11 % 3, 11 % -3, -11 % -3 2> go

-------------- ----------- ----------- ----------- -2 2 -2 (1 row affected)

When you perform arithmetic operations on mixed datatypes, for example
`float` and `int`, the SAP ASE server follows specific rules
for determining the type of the result.

Created May 28, 2014. Send feedback on this help topic to Technical Publications: pubs@sap.com