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
How do I use mysql?
how you will show all records not containing the name "sonia" and the phone number '9876543210' order by the phone_number field.
Is mysql a scripting language?
What is mysql aggregate functions? Explain
How to check server status with 'mysqladmin'?
How to shutdown mysql server?
How many columns can you create for an index?
What is datatype in mysql?
What could be the reason that the mysql statement 'select avg (salary) from emp' generates an inaccurate output?
Can mysql function return a table?
What is bigint in mysql?
What does mysql_fetch_assoc do?
How we get sum of column.
What language is used in mysql?
What is the full form of mysql?