How can we change the name of a column of a table?

Answer Posted / chaithra.t

ALTER TABLE tablename RENAME COLUMN old_columnname TO
new_columnname;

above is to change the column name of the table.
In case if u want to change the table name then:

ALTER TABLE tablename RENAME TO new_tablename;

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to show all tables with 'mysql'?

530


What is a string in mysql?

469


What are mysql functions?

497


What is blob and text in mysql?

617


What is the date format in mysql?

458






Is null in mysql?

452


What is dump in mysql?

478


How to display top 10 rows in mysql?

580


Is mysql is a programming language?

529


How to enter numeric values as hex numbers?

537


What is pdo connection?

473


Why we use mysql workbench?

475


How do I copy a table in mysql workbench?

456


Can not connect to mysql server 10060?

502


What is required to create mysql database?

528