Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Arithmetic Operators (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Arithmetic operators perform mathematical operations on two expressions of one or more of the data types of the numeric data type category. For more information about data type categories, see Transact-SQL Syntax Conventions.

Operator

Meaning

+ (Add)

Addition

- (Subtract)

Subtraction

* (Multiply)

Multiplication

/ (Divide)

Division

% (Modulo)

Returns the integer remainder of a division. For example, 12 % 5 = 2 because the remainder of 12 divided by 5 is 2.

The plus (+) and minus (-) operators can also be used to perform arithmetic operations on datetime and smalldatetime values.

For more information about the precision and scale of the result of an arithmetic operation, see Precision, Scale, and Length (Transact-SQL).

Community Additions

ADD
Show:
© 2015 Microsoft