SQL videos | SQL Programming Part 3 - Variables in SQL

Posted by Andrew Gould on 21 November 2012

Using variables allows you to give your SQL procedures a memory. You can store a value in a variable and then retrieve and reuse that value at any point later in the same procedure. This video teaches you how to declare variables, assign values to them and make use of those values in a query. You'll also see how to store the result of a SELECT statement in a variable, as well as how to accumulate the value of a variable. You'll see a couple of methods of displaying the value stored in a variable and we'll end with a quick overview of the global variables in SQL Server.

You can play this video on SQL Programming Part 3 - Variables in SQL here (see viewing hints below also).

You can increase the size of the video:

Full screen mode for YouTube

You can view the video in full screen mode as shown on the left, using the icon at the bottom right of the frame.

You can also increase the quality of the video:

Changing resolution

You can improve the resolution of the video using another icon at the bottom right of the frame. This will slow down the connection speed, but increase the display and sound quality. This icon only becomes visible when you start playing the video.

Finally, if nothing happens when you play the video, check that you're not using IE in compatibility view.

This page has 0 threads Add post