我如何查询(使用 mysql)“不幸"的列名有圆括号吗? [英] How I query (with mysql) column names that "unfortunately" have round brackets?

查看:32
本文介绍了我如何查询(使用 mysql)“不幸"的列名有圆括号吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我这样查询 SELECT column_Name_(example) FROM primarytable WHERE blablabla 调试时发生异常.

If I query like this SELECT column_Name_(example) FROM primarytable WHERE blablabla an exception occurs while debugging.

有没有办法指定某一列中的所有字符都只是一个字符串?

Is there a way to specify that in a certain column all the char are only a string?

非常感谢!:)

推荐答案

只需使用`:

SELECT `column_Name_(example)` FROM primarytable WHERE blablabla

或者,根据 SQL 模式,":

or, depending on the SQL mode, ":

SELECT "column_Name_(example)" FROM primarytable WHERE blablabla

这篇关于我如何查询(使用 mysql)“不幸"的列名有圆括号吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆