exam questions

Exam MB-500 All Questions

View all questions & answers for the MB-500 exam

Exam MB-500 topic 4 question 2 discussion

Actual exam question from Microsoft's MB-500
Question #: 2
Topic #: 4
[All MB-500 Questions]

You are a Dynamics 365 Finance developer.
You have a table named FMVehicle that contains a field named VehicleId. The table has an index named VehicleIdIdx on the VehicleId field. You declare a table buffer named vehicle to refer to the table.
You need to select all records from the FMVehicle table in ascending order based on VehicleId field in the vehicle variable.
Which embedded-SQL statement should you use?

  • A. select vehicle index VehicleId;
  • B. select vehicle order by VehicleId;
  • C. select VehicleId from vehicle order by VehicleId asc;
  • D. select vehicle order by VehicleId desc;
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
Prollyx
7 months, 2 weeks ago
Selected Answer: B
B returns all the values for each record. C returns only VehicleId and noone specified we need VehicledId only.
upvoted 3 times
...
saikumari
7 months, 4 weeks ago
from is not there in b check it once. so is crt
upvoted 1 times
...
faycal
10 months, 1 week ago
Answer is B
upvoted 1 times
...
Viking2050
10 months, 4 weeks ago
B because the question asked for all records and not just all VehicleIds.
upvoted 3 times
...
Sisb
11 months, 1 week ago
My habit is C, But C did not bring back all records. C is the best practice to use SQL
upvoted 1 times
Sisb
11 months, 1 week ago
Me too, B is right answer with order by VehicleID default asc, but it is not best practice.
upvoted 1 times
...
...
Pavan7319
1 year ago
c is the best object is mentioned
upvoted 2 times
...
Roanoak127
1 year, 2 months ago
I think it's B because it says it wants all records not just the vehicleID num like C has. But adding the asc would make it more clear which direction you want
upvoted 2 times
pinticas
1 year, 1 month ago
The most correct is B cause it forces to order ASC. A is correct too because it forces to use the index that will self order it ASC too... but lets say it is not done in the good way so B.
upvoted 1 times
pinticas
1 year, 1 month ago
Forget it, index is not named VehicleId, it is B.
upvoted 1 times
...
...
...
KennySaelen
1 year, 2 months ago
C would even be best because only selecting the field would ensure SQL has even a higher probability of picking the right index as the matching colums would be equal
upvoted 2 times
...
ET82
1 year, 4 months ago
B & D are equivalent, isn't it?
upvoted 1 times
goyalsachin6
1 year, 3 months ago
No. D uses desc keyword at last which gets the data in descending order.
upvoted 1 times
ET82
1 year, 3 months ago
Sorry sach...I meant 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