exam questions

Exam 70-461 All Questions

View all questions & answers for the 70-461 exam

Exam 70-461 topic 1 question 176 discussion

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

You develop a Microsoft SQL Server database that contains a table named Products. The Products table has columns named ProductId, CategoryId, Name, and
Price.
Product prices are often updated as follows:
✑ For a single product by a specific value by using the ProductId column
✑ For an entire category by a percentage by using the CategoryId column
You need to log the change price to a new table named PriceChange by using the ProductId' ChangedValue, and ChangedDate columns. You also need to ensure that increases in price are recorded as positive values and decreases in price as negative values.
Which Transact-SQL query should you use?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: D
Incorrect Answers:
A, B: Price change would be displayed incorrectly. Price increases would be displayed as negative numbers.

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
lilupv
4 years, 8 months ago
But why not C? You had price 60, it was changed to 70. So, inserted (70) - deleted (60) = 10. D will provide negative value in case of increase.
upvoted 2 times
Bluesong
4 years, 4 months ago
I am also looking for the answer.but C,D is not right answer. Question said if value decrease than negative value come in.in my opinion the answer is A(not sure). B and D contain the same query. Thanks
upvoted 1 times
Bluesong
4 years, 4 months ago
U r right.the answer would b C.
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago