Rename table with spaces mysql

后端 未结 3 1859
心在旅途
心在旅途 2020-12-19 15:07

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          


        
3条回答
  •  旧巷少年郎
    2020-12-19 15:16

    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.

提交回复
热议问题