Skip to content

Commit 8745552

Browse files
authored
added syntaxsql and sql colorizers
1 parent f6f4f16 commit 8745552

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

docs/t-sql/language-elements/unary-operators-positive.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Returns the value of a numeric expression (a unary operator). Unary operators pe
4141
## Syntax
4242

4343
```syntaxsql
44-
4544
+ numeric_expression
4645
```
4746

@@ -62,8 +61,8 @@ Returns the value of a numeric expression (a unary operator). Unary operators pe
6261
### A. Setting a variable to a positive value
6362
The following example sets a variable to a positive value.
6463

65-
```
66-
DECLARE @MyNumber decimal(10,2);
64+
```sql
65+
DECLARE @MyNumber DECIMAL(10,2);
6766
SET @MyNumber = +123.45;
6867
SELECT @MyNumber;
6968
GO
@@ -81,10 +80,10 @@ GO
8180
### B. Using the unary plus operator with a negative value
8281
The following example shows using the unary plus with a negative expression and the ABS() function on the same negative expression. The unary plus does not affect the expression, but the ABS function returns the positive value of the expression.
8382

84-
```
83+
```sql
8584
USE tempdb;
8685
GO
87-
DECLARE @Num1 int;
86+
DECLARE @Num1 INT;
8887
SET @Num1 = -5;
8988
SELECT +@Num1, ABS(@Num1);
9089
GO

0 commit comments

Comments
 (0)