exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 68 discussion

Actual exam question from Microsoft's 70-762
Question #: 68
Topic #: 1
[All 70-762 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine whether the solution meets the stated goals.
You have a database that contains a table named Employees. The table stores information about the employees of your company.
You need to implement and enforce the following business rules:
✑ Limit the values that are accepted by the Salary column.
✑ Prevent salaries less than $15,000 and greater than $300,000 from being entered.
✑ Determine valid values by using logical expressions.
✑ Do not validate data integrity when running DELETE statements.
Solution: You implement a FOR UPDATE trigger on the table.
Does the solution meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
References:
http://stackoverflow.com/questions/16081582/difference-between-for-update-of-and-for-update

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
MML
Highly Voted 4 years, 11 months ago
"For update" trigger is equal "After update" trigger, so the answer is No.
upvoted 8 times
...
JohnFan
Highly Voted 5 years, 3 months ago
https://stackoverflow.com/questions/5340638/difference-between-a-for-and-after-triggers
upvoted 5 times
...
HA2020
Most Recent 4 years, 5 months ago
how about when such a record is INSERTed? the answer is NO
upvoted 2 times
...
Alex5x
4 years, 7 months ago
I see no reason to say that UPDATE trigger does not meet the goal. Look at this: CREATE TRIGGER dbo.TR_UPD_Employee ON dbo.Employee AFTER UPDATE AS BEGIN IF EXISTS(SELECT 1 FROM inserted WHERE Salary < 15000 OR Salary > 300000) ROLLBACK TRAN; END I agree that it is not an ideal solution. CHECK constraint should be used instead. However, the trigger does the job in my opinion.
upvoted 1 times
giuPigna
4 years, 7 months ago
How do you meet this: "Do not validate data integrity when running DELETE statements"
upvoted 2 times
...
...
MarcusJB
4 years, 8 months ago
If it was an INSTEAD OF trigger, I had said it's ok, but not with a FOR/AFTER trigger.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...