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

Commit 816219e

Browse files
authored
Merge pull request #17056 from icoric/icoric-patch-10
sql colorizer updates - tsql docs / functions pt.1
2 parents 14d3c6e + 570de8e commit 816219e

82 files changed

Lines changed: 205 additions & 214 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ SELECT ABS(-1.0), ABS(0.0), ABS(1.0);
5454

5555
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
5656

57-
```sql
57+
```
5858
---- ---- ----
5959
1.0 .0 1.0
6060
```
6161

6262
The `ABS` function can produce an overflow error when the absolute value of a number exceeds the largest number that the specified data type can represent. For example, the `int` data type has a value range from `-2,147,483,648` to `2,147,483,647`. Computing the absolute value for the signed integer `-2,147,483,648` will cause an overflow error because its absolute value exceeds the positive range limit for the `int` data type.
6363

6464
```sql
65-
DECLARE @i int;
65+
DECLARE @i INT;
6666
SET @i = -2147483648;
6767
SELECT ABS(@i);
6868
GO

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ This example returns the `ACOS` value of the specified number.
4949

5050
```sql
5151
SET NOCOUNT OFF;
52-
DECLARE @cos float;
52+
DECLARE @cos FLOAT;
5353
SET @cos = -1.0;
54-
SELECT 'The ACOS of the number is: ' + CONVERT(varchar, ACOS(@cos));
54+
SELECT 'The ACOS of the number is: ' + CONVERT(VARCHAR, ACOS(@cos));
5555
```
5656

5757
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
5858

59-
```sql
59+
```
6060
---------------------------------
6161
The ACOS of the number is: 3.14159
6262

docs/t-sql/functions/app-name-transact-sql.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ This function returns the application name for the current session, if the appli
3535

3636
## Syntax
3737

38-
```sql
39-
38+
```syntaxsql
4039
APP_NAME ( )
4140
```
4241

@@ -57,9 +56,9 @@ This example checks whether the client application that initiated this process i
5756
USE AdventureWorks2012;
5857
GO
5958
IF APP_NAME() = 'Microsoft SQL Server Management Studio - Query'
60-
PRINT 'This process was started by ' + APP_NAME() + '. The date is ' + CONVERT ( varchar(100) , GETDATE(), 101) + '.';
59+
PRINT 'This process was started by ' + APP_NAME() + '. The date is ' + CONVERT ( VARCHAR(100) , GETDATE(), 101) + '.';
6160
ELSE
62-
PRINT 'This process was started by ' + APP_NAME() + '. The date is ' + CONVERT ( varchar(100) , GETDATE(), 102) + '.';
61+
PRINT 'This process was started by ' + APP_NAME() + '. The date is ' + CONVERT ( VARCHAR(100) , GETDATE(), 102) + '.';
6362
GO
6463
```
6564

docs/t-sql/functions/applock-mode-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This function returns the lock mode held by the lock owner on a particular appli
3131

3232
## Syntax
3333

34-
```sql
34+
```syntaxsql
3535
APPLOCK_MODE( 'database_principal' , 'resource_name' , 'lock_owner' )
3636
```
3737

@@ -77,7 +77,7 @@ User A runs:
7777
USE AdventureWorks2012;
7878
GO
7979
BEGIN TRAN;
80-
DECLARE @result int;
80+
DECLARE @result INT;
8181
EXEC @result=sp_getapplock
8282
@DbPrincipal='public',
8383
@Resource='Form1',

docs/t-sql/functions/applock-test-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This function returns information as to whether or not a lock can be granted on
3232

3333
## Syntax
3434

35-
```sql
35+
```syntaxsql
3636
APPLOCK_TEST ( 'database_principal' , 'resource_name' , 'lock_mode' , 'lock_owner' )
3737
```
3838

@@ -73,7 +73,7 @@ Two users (**User A** and **User B**), with separate sessions, run the following
7373
USE AdventureWorks2012;
7474
GO
7575
BEGIN TRAN;
76-
DECLARE @result int;
76+
DECLARE @result INT;
7777
EXEC @result=sp_getapplock
7878
@DbPrincipal='public',
7979
@Resource='Form1',

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,27 @@ This example takes a **float** expression and returns the ASIN value of the spec
5050
```sql
5151
/* The first value will be -1.01. This fails because the value is
5252
outside the range.*/
53-
DECLARE @angle float
53+
DECLARE @angle FLOAT
5454
SET @angle = -1.01
55-
SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))
55+
SELECT 'The ASIN of the angle is: ' + CONVERT(VARCHAR, ASIN(@angle))
5656
GO
5757

5858
-- The next value is -1.00.
59-
DECLARE @angle float
59+
DECLARE @angle FLOAT
6060
SET @angle = -1.00
61-
SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))
61+
SELECT 'The ASIN of the angle is: ' + CONVERT(VARCHAR, ASIN(@angle))
6262
GO
6363

6464
-- The next value is 0.1472738.
65-
DECLARE @angle float
65+
DECLARE @angle FLOAT
6666
SET @angle = 0.1472738
67-
SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))
67+
SELECT 'The ASIN of the angle is: ' + CONVERT(VARCHAR, ASIN(@angle))
6868
GO
6969
```
7070

7171
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
7272

73-
```sql
73+
```
7474
-------------------------
7575
.Net SqlClient Data Provider: Msg 3622, Level 16, State 1, Line 3
7676
A domain error occurred.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This function returns information about a property of an assembly.
2929

3030
## Syntax
3131

32-
```sql
32+
```syntaxsql
3333
ASSEMBLYPROPERTY('assembly_name', 'property_name')
3434
```
3535

docs/t-sql/functions/asymkey-id-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Returns the ID of an asymmetric key.
3333

3434
## Syntax
3535

36-
```sql
36+
```syntaxsql
3737
ASYMKEY_ID ( 'Asym_Key_Name' )
3838
```
3939

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This function returns the properties of an asymmetric key.
2828

2929
## Syntax
3030

31-
```sql
31+
```syntaxsql
3232
ASYMKEYPROPERTY (Key_ID , 'algorithm_desc' | 'string_sid' | 'sid')
3333
```
3434

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ GO
5858

5959
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
6060

61-
```sql
61+
```
6262
6363
-------------------------------
6464
The ATAN of -45.01 is: -1.54858

0 commit comments

Comments
 (0)