Quiz Yourself: T-SQL Basics

Test your knowledge of the basic syntax of T-SQL.

T-SQL Basics Quiz

1

Consider the following dbo.Orders table.

OrderId ItemId Quantity
1 25 4
2 2 7
3 11 1

(Select all that apply.) Which of the given option(s) will result in the following output?

OrderId
1
3
A)
SELECT OrderId FROM dbo.Orders
WHERE OrderId = 1 OR OrderId = 3;
B)
SELECT OrderId FROM dbo.Orders
WHERE Quantity < 4;
C)
SELECT OrderId FROM dbo.Orders
WHERE OrderId = 1 AND OrderId = 3;
D)
SELECT OrderId FROM dbo.Orders
WHERE Quantity < 6;
Question 1 of 50 attempted

Get hands-on with 1200+ tech skills courses.