web analytics

You need to write a Transact-SQL statement that will find out the success of a cast to a DECIMAL (36,9). Which code segment should you use?

You use Microsoft SQL Server to develop a database application. Your application sends data to an NVARCHAR(MAX) variable named @var. You need to write a Transact-SQL statement that will find

You need to create a report that displays the profits made by each territory for each year and its preceding year. Which Transact-SQL query should you use?

A table named Profits stores the total profit made each year within a territory. The Profits table has columns named Territory, Year, and Profit. You need to create a report

Which Transact-SQL statement should you use?

You use Microsoft SQL Server to develop a database application. You create a stored procedure named DeleteJobCandidate. You need to ensure that if DeleteJobCandidate encounters an error, the execution of

You need to store the prices that include a fixed precision and a scale of six digits. Which data type should you use?

You are developing a database that will contain price information. You need to store the prices that include a fixed precision and a scale of six digits. Which data type

You need to achieve this goal by using the minimum amount of administrative effort. What should you do?

You administer a Microsoft SQL Server database that has multiple tables in the Sales schema. Some users must be prevented from deleting records in any of the tables in the

Which Transact-SQL statement should you use?

You develop three Microsoft SQL Server databases named Database1, Database2, and Database3. You have permissions on both Database1 and Database2. You plan to write and deploy a stored procedure named

Retain only the newest Products row. Which Transact-SQL query should you use?

You administer a Microsoft SQL Server database that includes a table named Products. The Products table has columns named ProductId, ProductName, and CreatedDateTime. The table contains a unique constraint on

Which Transact-SQL query or queries should you use? (Each correct answer presents a complete solution. Choose all that apply.)

You administer a Microsoft SQL Server database that supports a banking transaction management application. You need to retrieve a list of account holders who live in cities that do not

Which data type should you use?

You are developing a database that will contain price information. You need to store the prices that include a fixed precision and a scale of six digits. Which data type

Which Transact- SQL query or queries should you use? (Each correct answer presents a complete solution. Choose all that apply.)

You administer a Microsoft SQL Server database that supports a shopping application. You need to retrieve a list of customers who live in territories that do not have a sales

Which Transact-SQL operator should you use?

You use Microsoft SQL Server 2012 database to develop a shopping cart application. You need to rotate the unique values of the ProductName field of a table-valued expression into multiple

You need to display dates and times in several international formats. What should you do?

Note: This question is part of a series of questions that use the same set of answer choices. An answer choice may be correct for more than one question in

What should you do?

Note: This question is part of a series of questions that use the same set of answer choices. An answer choice may be correct for more than one question in

Which Transact-SQL query should you use?

Your database contains a table named Purchases. The table includes a DATETIME column named PurchaseTime that stores the date and time each purchase is made. There is a non-clustered index

You need to optimize transaction logging and locking for the statement. Which table hint should you use?

You develop a Microsoft SQL Server database that contains a heap named OrdersHistorical. You write the following Transact-SQL query: INSERT INTO OrdersHistorical SELECT * FROM CompletedOrders You need to optimize

Which Transact-SQL statement or statements should you use? (Each correct answer presents part of the solution. Choose all that apply.)

You develop a Microsoft SQL Server database. You need to create and call a stored procedure that meets the following requirements: Accepts a single input parameter for CustomerID. Returns a

Enables the returned result set to perform a join with a table. Which object should you use?

You develop a Microsoft SQL Server database. You need to create a batch process that meets the following requirements: Returns a result set based on supplied parameters. Enables the returned

You need to achieve this goal by using the minimum amount of changes to the existing applications. What should you create for each application?

You develop a Microsoft SQL Server database. The database is used by two web applications that access a table named Products. You want to create an object that will prevent

You administer a Microsoft SQL Server database that contains a table named OrderDetail. You discover that the NCI_OrderDetail_CustomerID non-clustered index is fragmented. You need to reduce fragmentation. You need to achieve this goal without taking the index offline. Which Transact-SQL batch should you use?

You administer a Microsoft SQL Server database that contains a table named OrderDetail. You discover that the NCI_OrderDetail_CustomerID non-clustered index is fragmented. You need to reduce fragmentation. You need to

You need to ensure that the documents must only be accessible via Transact-SQL queries.

You use a Microsoft SQL Server database. You want to create a table to store Microsoft Word documents. You need to ensure that the documents must only be accessible via

Which stored procedure option should you use?

You are a database developer at an independent software vendor. You create stored procedures that contain proprietary code. You need to protect the code from being viewed by your customers.

You need to ensure that your query executes in the minimum possible time. Which query should you use?

Your database contains two tables named DomesticSalesOrders and InternationalSalesOrders. Both tables contain more than 100 million rows. Each table has a Primary Key column named SalesOrderId. The data in the

Which Transact-SQL statement should you include at the beginning of the stored procedure?

You create a stored procedure that will update multiple tables within a transaction. You need to ensure that if the stored procedure raises a run-time error, the entire transaction is

Which Transact-SQL query should you use?

You have a Microsoft SQL Server database that contains tables named Customers and Orders. The tables are related by a column named CustomerID. You need to create a query that

You create a stored procedure. You need to supply the stored procedure with multiple event names and their dates as parameters. What should you do?

Note: This question is part of a series of questions that use the same set of answer choices. An answer choice may be correct for more than one question in

You need to store the departure and arrival dates and times of flights along with time zone information. What should you do?

Note: This question is part of a series of questions that use the same set of answer choices. An answer choice may be correct for more than one question in

Which Transact-SQL statement should you use?

You develop a Microsoft SQL Server server database that supports an application. The application contains a table that has the following definition: CREATE TABLE Inventory (ItemID int NOT NULL PRIMARY