SQL exercises on TEMPORARY TABLES AND TABLE VARIABLES

This page lists the 9 exercises about Temporary tables and table variables in SQL on our website:

Software: SQL
Version: Any version of SQL Server
Topic: Temporary tables and table variables
Level: Relatively easy
Course: Advanced SQL
Exercise: Write SQL to put Dr Who rows in a temporary table, and add companions and enemies into this.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Temporary tables and table variables
Level: Relatively easy
Course: Advanced SQL
Exercise: Declare a table variable, and copy the Dr Who companions, enemies and doctors into it.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Temporary tables and table variables
Level: Relatively easy
Course: Advanced SQL
Exercise: Try both methods of creating Temporary tables, using INTO and CREATE.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Temporary tables and table variables
Level: Average difficulty
Course: Advanced SQL
Exercise: Use a table variable to hold useful information from several sources together.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Temporary tables and table variables
Level: Average difficulty
Course: Advanced SQL
Exercise: Use a table variable to join one set of data to another table.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Temporary tables and table variables
Level: Average difficulty
Course: Advanced SQL
Exercise: Add rows one by one within a loop into a temporary table that you've created.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Temporary tables and table variables
Level: Average difficulty
Course: Advanced SQL
Exercise: Use a temporary table or table variable to combine the best Doctor Who episodes into a single table.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Temporary tables and table variables
Level: Harder than average
Course: Advanced SQL
Exercise: Use a table variable or temporary table to build up a list of database problems in a single table.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Temporary tables and table variables
Level: Harder than average
Course: Advanced SQL
Exercise: Write the names of your stored procedures and functions to a temporary table or table variable.

Go to exercise ...

You can search our full list of SQL exercises here, or why not have a look at our other SQL training resources?

This page has 0 threads Add post