Inline variable assignment in sql server 2008 - Sql server 2008

Explain inline variable assignment in sql server 2008 with an example.

Inline variable assignment in SQL Server 2008 enables to – declare, and assign the variables in a ‘single line’.

The traditional Ex:
DECLARE @myVar int
SET @myVar = 5
need to declare the variable and assigning it to the variable to split into 2 lines and use 2 statements - DECLARE and SET.

In SQL Server 2008, as the name suggests ‘inline’, both declaration and assignment can be given in a single line:
DECLARE @myVar int = 5
What is Compound Operators in sql server 2008? - Sql server 2008
Compound operators feature is enhanced in SQL Server 2008. They are like compound operators in languages like C, C++ etc..........
SQL Server 2008 introduces automatic auditing - Sql server 2008
Automatic auditing is a true auditing solution for enterprise customers. STL Trace can be used for satisfying several auditing needs..........
Compression - row-level and page-level compression - Sql server 2008
Data compression is a feature which is used to reduce disk storage space and increase the performance of the query by reducing the I/O operations..........
Post your comment