How can we change the name of a column of a table?
Answer Posted / nithya
changing a column name differs from the type of database we use.
MySQL:
ALTER table customer CHANGE Address Addr char(50);
Oracle:
ALTER table customer RENAME COLUMN Address TO Addr;
SQL Server:
It is not possible to rename a column using the ALTER TABLE
statement in SQL Server. Use sp_rename instead.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is normalization and list the different types of normalization?
In how many ways we can retrieve data in the result set of mysql using php?
What mysql -u john -p command does?
How do you insert a table?
What is mysqli_num?
What is delimiter in mysql trigger?
Is sqlite faster than mysql?
What are the other commands to know the structure of a table using mysql commands except explain command?
how to add a new column to an existing table?
What is a mysql server?
What is difference mysql and mysqli?
How to increment dates by 1 in mysql?
What is difference between unix timestamp and mysql timestamp?
Is mysql a backend?
How to create table show example