Tuesday 20 May 2014

SQL tutorials 21: How To Rename Table in SQL using ALTER TABLE statement


Rename Table.
Rename table using SQL alter table statement Explained in Detail
Sometimes we need to rename our table after we have already created it. In such cases there are two ways in which you can rename your table:
Drop the whole table altogether and recreate it with the new name. This is a logical choice if you are a student using your table for practice purposes only and can afford to lose the valuable data that your table contains. In practical environment there is a BIG NO for this method as Data held by database in tables is valuable and we cannot afford to lose it. If you opt for this method then for you I have a disclaimer –
“I do not recommend this method of renaming a table. If you opt this method then you will be responsible for your own loss.”
Second way of renaming a table is by using ALTER TABLE data manipulation language (DDL) statement. This is the recommended way of renaming a table. Let’s see how.
To know how watch Video or You can read the full article here

No comments:

Post a Comment