Oracle
1Z0-882 · Question #73
In the office table, the city column is structured as shown: Mysql> show columns from office like city'\G --------------------1. row --------------------- Field: city Type…
The correct answer is C. Amsterdam, New York, Paris, Tokyo. See the full explanation below for the reasoning.
Question
In the office table, the city column is structured as shown:
Mysql> show columns from office like city'\G --------------------1. row --------------------- Field: city Type: enum(paris'.'Amsterdam'.'New York'.'Tokyo') Null: Yes Key:
Default:NULL Extra:
Consider the output of the SELECT query executed on the office table:
Mysql> SELECT DISTINCT city FROM office ORDER BY city:
If the query is written as:
SELECT DISTINCT city FROM office ORDER BY CAST(city AS CHAR) In what order are the rows returned?
Options
- AParis, Amsterdam. New York, Tokyo
- BTokyo, New York, Amsterdam, Paris
- CAmsterdam, New York, Paris, Tokyo
- DTokyo, Paris, New York, Amsterdam
How the community answered
(26 responses)- A8% (2)
- B4% (1)
- C73% (19)
- D15% (4)
Community Discussion
No community discussion yet for this question.