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 mysqlcommand?
What is mysql aggregate functions? Explain
Explain the different types of constraints?
What is the use of mysql_fetch_array () function in php?
What language does mysql use?
Is microsoft sql same as mysql?
What is the use of mysql workbench?
What is logs in mysql?
What could be the reason that the mysql statement 'select avg (salary) from emp' generates an inaccurate output?
How to determine the location of the data directory?
What is procedure in mysql?
Can a table have multiple primary keys?
What are all the Common SQL Function?
Why should I learn mysql?
How large can a mysql database become?