Share via


Exploring Transact-SQL Improvements in SQL Server 2012 (RTM Update)

Version: 1.5

Description

In this lab, you will learn to use three improved features in the new SQL Server 2012. These features include creating sequences and using them to insert new rows in any table, querying data through pages iteratively, and raising and catching exceptions using Throw/Catch statements.

Overview

In this lab, you will learn to use three improved features in the new SQL Server 2012. These features include creating sequences and using them to insert new rows in any table, querying data through pages iteratively, and raising and catching exceptions using Throw/Catch statements.

Objectives

This lab is designed to teach the following skills:

  • Creating and using sequence objects.
  • Querying rows through paged results.
  • Raising and catching exceptions using Throw/Catch.

System Requirements

You must have the following items to complete this lab:

Setup

The setup and configuration for this lab involves running a Setup script included with the training kit. To run all setup tasks for this lab:

Note:
This process may require administrative privileges.
  1. Open a Windows Explorer window and browse to the lab’s Source folder.
  2. Double-click the Setup.cmd file in this folder to launch the setup script and run all setup tasks for this lab.
  3. If the User Account Control dialog is shown, confirm the action to proceed.
  4. When the Server Alias dialog shows up, click OK.
  5. After the SQL Server Alias has been created, click Close.
  6. Once the setup script has finished, press any key to close the console.

Exercises

This Hands-On Lab comprises the following exercise:

  1. Exercise 1: Creating and Using Sequence Numbers
  2. Exercise 2: Querying Data Using the Offset/Fetch Syntax
  3. Exercise 3: Raising Exceptions Using the Throw Statement

Estimated time to complete this lab: 30 minutes.

Feedback

Your feedback is welcome! Please, post it on our UserVoice forums.