Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of the following modifications may not succeed?

  • A.Changing a column data type from char to date
  • B.Changing a column data type from numeric to char
  • C.Both of the above actions should succeed.
  • D.Neither of the above actions will succeed.

Answer: A

Correct answer: Changing a column data type from char to date

Widening a type is safe; narrowing or reinterpreting it depends on what the existing rows contain. Numeric to char always succeeds, since any number has a character representation. Char to date succeeds only if every value in the column can be parsed as a date, and a single row containing a blank, a note or a differently formatted string will cause the whole statement to fail.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.