Tell me inline variable assignment in sql server 2008 with an example?
Submitted by: AdministratorInline 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
Submitted by: Administrator
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
Submitted by: Administrator
Read Online SQL server 2008 Job Interview Questions And Answers
Top SQL server 2008 Questions
☺ | Explain Sparse Columns of sql server 2008? |
☺ | Do you know PowerShell included in SQL Server 2008? |
☺ | Explain how to store and query Spatial Data? |
☺ | What is Change Data Capture (CDC) feature in sql server 2008? |
☺ | Do you know Enhanced database mirroring in sql server 2008? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |