T-SQL and Common Table Expression
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Medium
Rovin Garcia
Used 4+ times
FREE Resource
Enhance your content in a minute
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is the primary purpose of a Common Table Expression (CTE) in T-SQL?
To permanently store temporary data
To simplify complex subqueries and make queries more readable
To define a new database schema
To create a clustered index on a table
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
A CTE is defined using which T-SQL keyword?
CREATE VIEW
WITH
DECLARE
CREATE FUNCTION
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following statements about a non-recursive CTE is TRUE?
It can be referenced multiple times within the same query.
It is a permanent object stored in the database.
It can be used to perform DML operations (e.g., INSERT, UPDATE, DELETE).
It can only reference a single table.
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
CTE's scope is limited to the:
Entire database instance
Entire stored procedure or function
immediate SELECT, INSERT, UPDATE, or DELETE statement that follows it
Current user session
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is the main advantage of a CTE over a derived table (subquery in the FROM clause)?
Better performance
The ability to be referenced by itself (recursion)
The ability to be referenced by other CTEs in the same WITH clause
All of the above
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Consider the following query:
SQL
WITH EmployeeCTE (EmployeeID, EmployeeName) AS (
SELECT EmployeeID, FirstName + ' ' + LastName
FROM Employees
)
SELECT * FROM EmployeeCTE;
What is EmployeeCTE?
A temporary table
A view
A CTE name
A table alias
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which type of CTE allows a query to refer to itself, making it suitable for traversing hierarchical data?
Simple CTE
Non-recursive CTE
Recursive CTE
Common CTE
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
25 questions
5. LINUX_3_polecenia systemowe
Quiz
•
11th Grade - University
26 questions
EVALUAC DE CONOC INTRO TEMA3 CIBERSE
Quiz
•
University
26 questions
Fun with Computers and Mice
Quiz
•
2nd Grade - University
28 questions
Review Python_G8
Quiz
•
8th Grade - University
29 questions
ÔN TẬP THI HK1 MÔN TIN HỌC LỚP 5
Quiz
•
5th Grade - University
25 questions
Chapter 4 Mastering Algebraic Expressions
Quiz
•
7th Grade - University
25 questions
Web 2.0 and ICT Projects Quiz
Quiz
•
11th Grade - University
25 questions
IT Concepts 2
Quiz
•
12th Grade - University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
Slopes and Slope-Intercept Form
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
20 questions
Winter/Holiday Trivia
Quiz
•
KG - University
10 questions
WINTER WIN Time - ELA - 12/9/2025
Quiz
•
KG - University
7 questions
Human Impact on Resources
Interactive video
•
4th Grade - University
