abes_nitya Posted August 7, 2006 Share Posted August 7, 2006 Before you ask a question in this forum, you should check out our SQL Tutorial.For our SQL Tutorial: W3Schools SQL TutorialFor a SQL Reference: W3Schools SQL Quick Reference Gr8 work 'kaijim'.Keep it up. sir i have tried a lot to know the answer of this question , that "how to change the column name of a table" plz help me thanks. Link to comment Share on other sites More sharing options...
skym Posted August 7, 2006 Share Posted August 7, 2006 You will find the answer here: http://dev.mysql.com/doc/refman/4.1/en/alter-table.html Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 7, 2006 Share Posted August 7, 2006 Example:ALTER TABLE tablename RENAME newtablename Link to comment Share on other sites More sharing options...
abes_nitya Posted August 7, 2006 Author Share Posted August 7, 2006 Example:ALTER TABLE tablename RENAME newtablename i don't want to change the table name... i want to change the column name of a tablebye Link to comment Share on other sites More sharing options...
aspnetguy Posted August 7, 2006 Share Posted August 7, 2006 use this ALTER TABLE tablename RENAME COLUMN currentColumnName TO newColumnName This will change hte name of the column without effecting contraints or type Link to comment Share on other sites More sharing options...
abes_nitya Posted August 7, 2006 Author Share Posted August 7, 2006 use thisALTER TABLE tablename RENAME COLUMN currentColumnName TO newColumnName This will change hte name of the column without effecting contraints or type sir ,i could not stoped ....without giving u a thanks.i want to say u a heartest thanks.because i have to implement this query to my project.thanks Link to comment Share on other sites More sharing options...
aspnetguy Posted August 7, 2006 Share Posted August 7, 2006 well, your very welcome Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 7, 2006 Share Posted August 7, 2006 Stupid of mine :)I knew that, If I only read it correctly Link to comment Share on other sites More sharing options...
guruparthi Posted July 5, 2014 Share Posted July 5, 2014 Alter table table_name change old_name new_name datatype(length) For ex, Alter table user change mail email varchar(50) Reference: http://www.phponwebsites.com/2013/12/mysql-change-column-name.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now