Skip to main content
October 9, 2013
Question

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

  • October 9, 2013
  • 1 reply
  • 900 views

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 has been closed for replies.

1 reply

October 14, 2013

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