Jump to content
Larry Ullman's Book Forums

Recommended Posts

I want to change various column names using:

 

ALTER TABLE tablename CHANGE COLUMN oldname newname columntype;

 

This is easy except for the last part (columntype). It seems silly to need to specify that since I don't want to change the column TYPE, only its name, but from what I've read, specifying columntype is mandatory. I need automated code, not show the table and manually view the columntype and manually input that. Thus I'd appreciate code that gives me $columntype. Thank you!

Link to comment
Share on other sites

 Share

×
×
  • Create New...