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

Discussion

Which SQL-92 standard SQL command can be used to change a table name?

  • A.
    RENAME TABLE
  • B.CHANGE TABLE
  • C.ALTER TABLE
  • D.None of the above is correct.

Answer: D

Correct answer: None of the above is correct.

SQL-92 contains no command for renaming a table. Individual products supply their own - RENAME TABLE in MySQL, sp_rename in SQL Server, ALTER TABLE ... RENAME TO in PostgreSQL and Oracle - but none of these is standard, so a rename cannot be written portably. The standard-conforming alternative is to create the new table, copy the data and drop the old one.

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

Post your comment

Please log in or register to post a comment.