Variables and functions are often used interchangeably. SQL Server Books Online documents some variables as if they were functions. However it's important to note that variables return a value whereas functions process specific business logic and many functions accept input arguments. Optional arguments are denoted using square brackets.
System Global Variables
The system-supplied global variables are organized into these categories:
Configuration
Cursor
System
System Statistics
Configuration
Cursor
System
System Statistical
System Functions
The system functions are organized into these categories: