Appendix C. T-SQL System Variables and Functions
Variables and functions are often used interchangeably. SQL Server Books Online documents some variables as though they were functions. However, it's important to note that variables are used in expressions to obtain a value, whereas functions process specific business logic and may return a value. Many functions accept input arguments.
This Appendix, specific for SQL Server 2008, is not meant to be a comprehensive reference, but to provide a convenient guide to many functions and variables. For complete details and samples of usage, consult Books Online.
System Global Variables
The system-supplied global variables are organized into the following categories:
Configuration
Cursor
System
System Statistics
Configuration
Variable | Return Type | Description |
---|---|---|
|
| The system setting for the first day of the week:
|
|
| The last assigned unique TimeStamp value |
|
| The current language ID for the server:
|
|
| The current language string for the server. Returns the language name in the native language form (us_english, Deutsch, Français, Dansk, Español, Italiano, etc.). |
|
| Lock time-out setting for the current session in milliseconds (ms) |
|
| The maximum concurrent connections setting for the server |
|
| The maximum precision ... |
Get Professional Microsoft® SQL Server® 2008 Reporting Services now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.