/db-labs

DB lab tasks

Primary LanguageTSQL

Data Bases

Lab 1

Getting started with SQL Server. Create basic queries to the AdventureWorks2012 database. Working with the HumanResources schema.

Lab 2

INNER JOIN operations. Creation and modification of tables, primary keys, constraints. INSERT statement.

Lab 3

Updating data using the UPDATE statement. Deleting data DELETE. Dropping objects using the DROP operator. Using temporary tables and table variables. Merge operator. Using CTE expressions.

Lab 4

Working with view VIEW. Indexed view. Changing data in a table through a view. Create an AFTER DML trigger for a table. Logging changes to the history table. Create an INSTEAD OF DML trigger for a view.

Lab 5

User-defined functions: scalar-valued, inline table-valued, multistatement table-valued. CROSS APPLY and OUTER APPLY operators.

Lab 6

Creation of stored procedures. Using dynamic SQL. PIVOT operator for forming a pivot table.

Lab 7

Working with XML.