Is a unary operator that returns the negative value of a numeric expression (a unary operator).
-numeric_expression
Returns the data type of numeric_expression, except that an unsigned tinyint expression is promoted to a signed smallint result.
This example sets a variable to a negative value.
DECLARE @MyNumber decimal(10,2)
@MyNumber = -123.45
This example negates a variable.
DECLARE @Num1 int
SET @Num1 = 5
SELECT -@Num1
Data Types | Operators |
Expressions |