SQL exercises on DYNAMIC SQL

This page lists the 4 exercises about Dynamic SQL in SQL on our website:

Software: SQL
Version: Any version of SQL Server
Topic: Dynamic SQL
Level: Relatively easy
Course: Advanced SQL
Exercise: Create a stored procedure which can change the name of the table in the FROM clause.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Dynamic SQL
Level: Average difficulty
Course: Advanced SQL
Exercise: Create a query which selects whatever columns, sort order and table you pass in as parameters, using dynamic SQL.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Dynamic SQL
Level: Average difficulty
Course: Advanced SQL
Exercise: Write a procedure using EXEC which varies the sort column according to the parameter value passed.

Go to exercise ...

Software: SQL
Version: Any version of SQL Server
Topic: Dynamic SQL
Level: Harder than average
Course: Advanced SQL
Exercise: Using a comma-delimited list variable filter another select statement using dynamic SQL.

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