advertise here

Rename Table Column Name Mysql

Rename table name Mysql

RENAME TABLE  `old_tablename`  TO  `new_tablename`;

Example - change/rename table name city to cities 

rename table mysql sql oracle free code tutorials with example

Syntax - Rename TABLE  `city` TO `cities`

Result -

rename my sql table name sql oracle and other databse free code tutorials with live example

Rename column name Mysql

ALTER TABLE tablename CHANGE `old_columnname`  `new_columnname` datatype();

Example - need to change/rename the column name cityname to cname from city table


rename column name mysql sql oracle and other databse with examples free code tutorials

ALTER TABLE city CHANGE `cityname`  `cname` VARCHAR(50);

Result -

rename column name mysql sql oracle and other databases with live code examples tutorials




advertise here