Renaming a table

Abstract: Renaming a table


I have a table in the database named TABLE_ONE. This table contains data. Is it possible to rename this table to TABLE_TWO? Can I do this via SQL?


No, you cannot simply rename the table, nor can you rename it using SQL. You must create a new table with the name you desire and then transfer the data from TABLE_ONE to TABLE_TWO. This part is fairly straightforward. The tedious part will be recreating any and all domains, constraints, triggers, stored procedures, etc, etc. for TABLE_TWO.