You work as a SQL Server 2012 database developer at ABC.com. TesABCig.com has a database named DataDB.
You are developing a complex stored procedure named sp_updater that will use a single transaction to update several tables in the DataDB database.
You are concerned about data integrity and incomplete updates should the sp_updater stored procedure cause a run- time error.
To mitigate this potential problem you want the transaction to terminate and the transaction to be rolled back if the sp_updater stored procedure raises a run-time error.
How would you accomplish this task?
A. You should make use of the SET XACT_ABORT ON statement in the stored procedure.What is the default frame window functions use when a window order clause is specified but an explicit window frame clause isn't? (Choose all that apply.)
A. ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROWYou develop a Microsoft SQL Server 2012 database that contains tables named Customers and Orders. The tables are related by a column named CustomerId. You need to create a query that meets the following requirements:
-
Returns the CustomerName for all customers and the OrderDate for any orders that they have placed.
-
Results must not include customers who have not placed any orders. Which Transact-SQL query should you use?
A. SELECT CustomerName, OrderDate FROM Customers LEFT OUTER JOIN Orders ON Customers.CuscomerlD = Orders.CustomerIdYou use a Microsoft Azure SQL Database instance. The instance contains a table named Products that has columns named Code, Name, and IsPerishable. You need to create a view named VwPerishableProducts that:
1.
returns rows from Products that have a value of True in the IsPerishable column;
2.
does not allow columns to be altered or dropped in the underlying table. Which Transact-SQL statement should you run?

You develop a Microsoft SQL Server database. You design a table to store product information. The table is defined as follows:

You need to meet the following requirements:
If a product has a product category value "REGULAR", the product should have a sub-category with a length of two characters.
If a product has the product category other than "REGULAR", the product may or may not have a sub-category.
Which Transact-SQL statement should you use?

What levels can an index have? (Choose all that apply.)
A. Intermediate levelYou administer a database that includes a table named Customers that contains more than 750 rows. You create a new column named PartitionNumber of the int type in the table. You need to assign a PartitionNumber for each record in the Customers table. You also need to ensure that the PartitionNumber satisfies the following conditions:
-Always starts with 1.
-
Starts again from 1 after it reaches 100. Which Transact-SQL statement should you use?
A. CREATE SEQUENCE CustomerSequence AS int START WITH 0 INCREMENT BY 1 MINVALUE 1 MAXVALUE 100 UPDATE Customers SET PartitionNumber = NEXT VALOE FOR CustomerSequence DROP SEQUENCE CustomerSequenceYou use Microsoft SQL Server 2012 to develop a database application. You create a stored procedure named dbo.ModifyData that can modify rows. You need to ensure that when the transaction fails, dbo.ModifyData meets the following requirements:
-Does not return an error.
-
Closes all opened transactions. Which Transact-SQL statement should you use?
A. BEGIN TRANSACTION BEGIN TRY EXEC dbo.ModifyData COMMIT TRANSACTION END TRY BEGIN CATCH IF @@ TRANCOUNT = 0 ROLLBACK TRANSACTION; END CATCHYou work as a database administrator at ABC.com. ABC.com has a SQL Server 2012 database named SalesDB. The SalesDB database is shown in the following database diagram: You need to write a Transact-SQL query that displays all Customers, whether they have invoices or not. The query must also display the InvoiceDate for a Customer that has an Invoice. How would you accomplish this task?

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 columns in the output. Which Transact-SQL operator should you use?
A. CROSS JOINNowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 70-461 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.