+ (Positive)

Transact-SQL Reference

Transact-SQL Reference

+ (Positive)

A unary operator that returns the positive value of a numeric expression (a unary operator).

Syntax

+ numeric_expression

Arguments

numeric_expression

Is any valid Microsoft® SQL Server™ expression of any of the data types in the numeric data type category except the datetime or smalldatetime data types.

Result Types

Returns the data type of numeric_expression, except that an unsigned tinyint expression is promoted to a smallint result.

Examples

This example sets a variable to a positive value.

DECLARE @MyNumber decimal(10,2)
SET @MyNumber = +123.45

See Also

Data Types

Expressions

Operators