PrepAway - Latest Free Exam Questions & Answers

Category: 70-433

Exam 70-433: TS: Microsoft SQL Server 2008, Database Development

Which result will be returned?

You need to determine the result of executing this code segment.
DECLARE @RangeStart INT = 0;
DECLARE @RangeEnd INT = 10000;
DECLARE @RangeStep INT = 1;

WITH NumberRange(ItemValue)
AS (
SELECT ItemValue
FROM (SELECT @RangeStart AS ItemValue) AS t
UNION ALL
SELECT ItemValue + @RangeStep
FROM NumberRange
WHERE ItemValue < @RangeEnd)

SELECT ItemValue
FROM NumberRange
OPTION (MAXRECURSION 100)

Which result will be returned?

Which code segment should you insert at line 3?

You have a table named Employee.
You document your company’s organizational hierarchy by inserting the EmployeeID of each employee’s manager in the ReportsTo column.
You need to write a recursive query that produces a list of employees and their manager.
The query must also include the employee’s level in the hierarchy.
You write the following code segment. (Line numbers are included for reference only.)

01 WITH EmployeeList (EmployeeID, FullName, ManagerName, Level)
02 AS (
03 ………
04 )
05 SELECT EmployeeID, FullName, ManagerName, Level
06 FROM EmployeeList;

Which code segment should you insert at line 3?

Which result should you expect?

You have the following rows in the
Customer Table:
CustomerId Status
1 Active
2 Active
3 Inactive
4 NULL
5 Dormant
6 Dormant

You write the following query to return all customers that do not have NULL or ‘Dormant’ for their status:

SELECT * FROM Customer
WHERE Status NOT IN (NULL, ‘Dormant’)

You need to identify the results of the query.
Which result should you expect?

Which results will the query return?

You have two tables named Customer and SalesOrder.
In the Customer table you have 1000 customers, of which 900 customers have orders in the SalesOrder table.
You execute the following query to list all customers that have had at least one sale.

SELECT * FROM Customer WHERE Customer.CustomerID IN (SELECT Customer.CustomerID FROM SalesOrder)

You need to identify the results of the query. Which results will the query return?

Which query should you use?

You have two tables named Customer and SalesOrder.
You need to identify all customers that have not yet made any purchases and those that have only made orders with an OrderTotal less than 100.
Which query should you use?


Page 8 of 14« First...678910...Last »