Multiple choice technology databases

How to rename a existing table.

  1. sp_rename TableNewName, ExistingTableName;

  2. sp_renametable ExistingTableName, TableNewName;

  3. sp_rename ExistingTableName, TableNewName;

  4. sp_renametable TableNewName, ExistingTableName;

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

sp_rename 'OldName', 'NewName' is the correct system stored procedure to rename a table (or other database objects). The first parameter is the current name, the second is the new name. Options A and D reverse the order, and sp_renametable doesn't exist - only sp_rename.