blogspot visit counter

Thursday 24 October 2013

How to Change Table Name in MySQL

Introduction :-
If you want to change the Table name without loss you data then it's very simple to change the table in MySQL database and sql server database.

Description : -

To change the name of an existing table first to second, use this command as shown below


RENAME TABLE first TO second;

For Example

You have table name like stodent_tab
and there are four fields like First_name,Last_Name,Stud_ID,Stud_Batch
and you want to change the name of  stodent_tab because you have done mistake in student_tab name

So Query Like This


RENAME TABLE stodent_tab TO student_tab;

Note -: This query is same if you want to use the sql server database.




Use PhpMyAdmin You Can Change the Table Name Like This 

Step 1 :- Open phpmyadmin


Step 2 : - Select database and click on table which you want to change the name . Appear  this GUI as show below


Step 3 :- Check Rename table to and write the name of table which you want to give and click Go Button
Your table name is change Successful

How to Change Table Name in MySQL

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...