Which object should you use?
You need to identify, within a given clause, if the month of February will contain 29 days for a
specified
year. Which object should you use?
Which option should you use when you create the function?
You are creating a function that references a table.
You need to prevent the table from being dropped.
Which option should you use when you create the function?
Which trigger syntax should you use?
Click the Exhibit button.
You are developing a database using Microsoft SQL Server 2008. The database contains the tables
shown in the exhibit.
You are required to prevent parts from being deleted if they belong to a kit. If a part belongs to a kit,
the
delete should not occur and the IsDeleted column for the row should be changed to ‘True’. Parts can
be
deleted if they do not belong to a kit.
You have the following TransactSQL
statement to be used in a trigger:
UPDATE p
SET IsDeleted = 1
FROM KitPart kp
JOIN deleted d ON kp.PartID = d.PartID
JOIN Part p ON kp.PartID = p.PartID;
DELETE FROM p
FROM Part p
JOIN deleted d ON p.PartID = d.PartID
LEFT OUTER JOIN KitPart kp ON p.PartID = kp.PartID
WHERE kp.KitID IS NULL;
You need to implement the TransactSQL
statement in a trigger. Which trigger syntax should you use?
You need to ensure that the new columns do not break the thirdparty application
You have a thirdparty
application that inserts data directly into a table.
You add two new columns to the table. These columns cannot accept NULL values and cannot use
default constraints.
You need to ensure that the new columns do not break the thirdparty
application.
What should you do?
Which TransactSQL statement should you use?
Your database contains two tables named Order and OrderDetails that store order information. They
relate to each other using the OrderID column in each table. Your business requires that the
LastModifiedDate column in the Order table must reflect the date and time when a change is made
in the OrderDetails table for the related order.
You need to create a trigger to implement this business requirement.
Which TransactSQL statement should you use?
You need to ensure that tables are not dropped from your database
You need to ensure that tables are not dropped from your database.
What should you do?
Which TransactSQL statement should you use?
You are responsible for a SQL Server database. You require the tables to be added or altered only on
the first day of the month. You need to ensure that if the tables are attempted to be modified or
created on any other day, an error is received and the attempt is not successful.
Which TransactSQL statement should you use?
Which options should you set?
You have a single CLR assembly in your database. The assembly only references blessed
assemblies from the Microsoft .NET Framework and does not access external resources.
You need to deploy this assembly by using the minimum required permissions. You must ensure that
your database remains as secure as possible. Which options should you set?
Which permission set should you use?
You have created an assembly that utilizes unmanaged code to access external resources.
You need to deploy the assembly with the appropriate permissions.
Which permission set should you use?
What should be the expected outcome?
You have tables named Products and OrderDetails. The Products table has a foreign key relationship
with the OrderDetails table on the ProductID column. You have the following TransactSQL
batch:
BEGIN TRY
BEGIN TRANSACTION
DELETE FROM Products WHERE ProductID = 5;
BEGIN TRANSACTION
INSERT INTO OrderDetails
( OrderID, ProductID, Quantity )
VALUES
( 1234, 5, 12 );
COMMIT TRANSACTION
COMMIT TRANSACTION
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
PRINT ERROR_MESSAGE();
END CATCH
You need to analyze the result of executing this batch. What should be the expected outcome?