Académique Documents
Professionnel Documents
Culture Documents
- Pradeep K Dash
Declare and Initialize Variables Microsoft SQL Server 2008 enables you to initialize variables inline as part of the variable declaration statement instead of using separate DECLARE and SET statements. This enhancement helps you abbreviate your code. The following code example demonstrates inline initializations using a literal and a function:
DECLARE @i AS INT = 0, @d AS DATETIME = CURRENT_TIMESTAMP; SELECT @i AS [@i], @d AS [@d];
This code sets the variable @price to its current value, 10.00, plus 2.00, resulting in 12.00.
Chapter: II
10
11
Demonstration
Demonstration Session 6
13
14
Demonstration
Demonstration Session 7
15
Additionally, backups of a database are useful for routine administrative purposes, such as copying a database from one server to another, setting up database mirroring, and archiving.
16
Demonstration
Demonstration Session 8
17
18
Demonstration
Demonstration Session 9
19
20
Thank You!