用空格mysql重命名表 [英] Rename table with spaces mysql
本文介绍了用空格mysql重命名表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在MySQL数据库中有一个表'A B C'(带空格,不要问我为什么). 我必须将其重命名为"ABC" 此查询不起作用:(
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 C' to 'ABC'
正确的查询应该是什么?
What should be the correct query?
我遇到相同的常见错误
'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version'
推荐答案
用反引号将名称转义.
rename table `A B C` to ABC
这篇关于用空格mysql重命名表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文