I have a table \'A B C\' (with spaces, don\'t ask me why) in MySQL database. I have to rename it to \'ABC\' This query doesn\'t work :(
rename table \'A B
Escape the name with backticks.
rename table `A B C` to ABC
You probably just need to enclose the name w/spaces with tick marks (`) instead of single (') quotes. I don't know how to escape ticks so they show in the code preview but I think you will be able to figure it out.
Use backticks:
rename table `A B C` to ABC;