Microsoft Dynamics 365: Finance and Operations Apps Developer — Question 69
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?
Answer options
- A. select vehicle order by VehicleIdIdx desc;
- B. select vehicle index VehicleId;
- C. select vehicle order by VehicleIdIdx asc;
- D. select vehicle index VehicleIdIdx;
Correct answer: C
Explanation
The correct answer is C because it specifies that records should be retrieved in ascending order using the index on VehicleId. Option A incorrectly requests a descending order, while option B does not specify an order at all, and option D uses the index without sorting the results.