Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 8354eed

Browse files
authored
added sql colorizer
1 parent c1b38e4 commit 8354eed

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/t-sql/functions/power-transact-sql.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
2929

3030
## Syntax
3131

32-
```
32+
```syntaxsql
3333
POWER ( float_expression , y )
3434
```
3535

@@ -61,7 +61,7 @@ If the result does not fit in the return type, an arithmetic overflow error occu
6161
### A. Using POWER to return the cube of a number
6262
The following example demonstrates raising a number to the power of 3 (the cube of the number).
6363

64-
```
64+
```sql
6565
DECLARE @input1 FLOAT;
6666
DECLARE @input2 FLOAT;
6767
SET @input1= 2;
@@ -82,7 +82,7 @@ Result1 Result2
8282
### B. Using POWER to show results of data type conversion
8383
The following example shows how the *float_expression* preserves the data type which can return unexpected results.
8484

85-
```
85+
```sql
8686
SELECT
8787
POWER(CAST(2.0 AS FLOAT), -100.0) AS FloatResult,
8888
POWER(2, -100.0) AS IntegerResult,
@@ -104,7 +104,7 @@ FloatResult IntegerResult IntegerResult Decimal1Result Decimal2Result
104104
### C. Using POWER
105105
The following example returns `POWER` results for `2`.
106106

107-
```
107+
```sql
108108
DECLARE @value INT, @counter INT;
109109
SET @value = 2;
110110
SET @counter = 1;
@@ -148,7 +148,7 @@ GO
148148
### D: Using POWER to return the cube of a number
149149
The following example shows returns `POWER` results for `2.0` to the 3rd power.
150150

151-
```
151+
```sql
152152
SELECT POWER(2.0, 3);
153153
```
154154

0 commit comments

Comments
 (0)