MCQ
Single Best Answer
Easy
QYou must fetch data from CustTable in ascending order based on City. CustTable contains a field named City. There is a non-unique cluster index named cityIdx on the City field. What are three possible statements that achieve the goal?
ID: #9398
Module 14: Database Manipulation
140 views
Question Info
#9398Q ID
EasyDifficulty
Module 14: Database ManipulationTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option D
Explanation
Justification:
- This statement will select all records from the CustTable organized by the index titled cityIdx, which is configured on the custTable.
- This statement selects all records from the custTable and specifies the “city” field in the table to order by. The default direction order by is ascending order.
- This statement selects all records in the CustTable and specifies to order by the city field in ascending order. This is the same as the default order. The order by clause will default to ascending order if none is specified as well.
- This statement will not work because the index name is not city, but cityIdx.
Related Lesson: Data Retrieval
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic