Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Guest
Oct 09, 2013 Oct 09, 2013

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.

TOPICS
Database access
906
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 14, 2013 Oct 14, 2013
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources