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

Unary Operators (Transact-SQL)

 

Applies To: SQL Server 2014, SQL Server 2016 Preview

Unary operators perform an operation on only one expression of any one of the data types of the numeric data type category. For more information about data type categories, see Transact-SQL Syntax Conventions.

Operator

Meaning

+ (Positive)             

Numeric value is positive.

- (Negative)             

Numeric value is negative.

~ (Bitwise NOT)             

Returns the ones complement of the number.

The + (Positive) and - (Negative) operators can be used on any expression of any one of the data types of the numeric data type category. The ~ (Bitwise NOT) operator can be used only on expressions of any one of the data types of the integer data type category.

Community Additions

ADD
Show:
© 2015 Microsoft