nerdexam
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)
  • A
    8% (2)
  • B
    4% (1)
  • C
    73% (19)
  • D
    15% (4)

Community Discussion

No community discussion yet for this question.

Full 1Z0-882 Practice