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

What is max connection in mysql?

491


What are the functions of commit and rollback statements?

552


How to show table structure mysql?

516


What are the advantages of mysql?

531


What is mysql default port number?

529






What is strict mode in mysql?

475


What are mysql functions?

490


Is Mysql query is case sensitive?

524


How do you use auto increment?

508


Give string types available for column?

550


What is the query to display top 20 rows?

603


What is mysql database used for?

482


I want to insert userid of a customer,order time,etc in a table called ordermaster with orderid as primary key.Same time the product codes and required quantities (a1,2 and a2 4 and so on)inserted in another table orderdetails with same orderid reference.How the code will be in JSP using MySQL?

1480


Is mysql easy to learn?

480


What are the advantages of MySQL when compared with Oracle?

535