Skip to content

Latest commit

 

History

History
50 lines (43 loc) · 2.39 KB

File metadata and controls

50 lines (43 loc) · 2.39 KB
title Arithmetic Operators (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 07/06/2017
ms.prod sql-non-specified
ms.prod_service database-engine, sql-database, sql-data-warehouse, pdw
ms.service
ms.component t-sql|language-elements
ms.reviewer
ms.suite sql
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic language-reference
dev_langs
TSQL
helpviewer_keywords
operators [Transact-SQL], arithmetic
arithmetic operators
math operations [Transact-SQL]
ms.assetid a41b92a5-1061-4e4d-bb3b-a180b73c88fa
caps.latest.revision 23
author douglaslMS
ms.author douglasl
manager jhubbard
ms.workload On Demand

Arithmetic Operators (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-all-md]

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).

See Also

Mathematical Functions (Transact-SQL)
Data Types (Transact-SQL)
Expressions (Transact-SQL)