本文介绍了如何在 MySQL 中选择带空格的列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I am working on a project where another developer created a table with column names like 'Business Name'
. That is a space between two words. If I run a SELECT
statement with 'Business Name' it says there is no column with name 'Business'.
How can I solve this problem?
解决方案
Generally the first step is to not do that in the first place, but if this is already done, then you need to resort to properly quoting your column names:
SELECT `Business Name` FROM annoying_table
Usually these sorts of things are created by people who have used something like Microsoft Access and always use a GUI to do their thing.
这篇关于如何在 MySQL 中选择带空格的列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!