Skip to main content
Oct 9, 2013 8:10 PM UTC
Question

How do I change the column name in mySQL when it has a space in it?

I know I can use the following line to change the column name: alter table tablename change "First Name" (Parenthesis used for clarification only) FirstName varchar (10) ;

my problem is the column name has a space in it, ie: First Name . So mySQL thinks it is changing "First" to "Name" then it hits the name I want it changed to and goes berserk. How can I change this? I can't even delete it. It happened when I imported Microsft SQL into  mySQL database.

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Oct 14, 2013 10:45 AM UTC

Figured it out. I used a program  SQLyog to edit the column name

Translate