我希望查询仅在存在名为firstName 的列时才进行选择。如果列是名字,那么查询不应返回任何内容。
SELECT firstName as currentName from tableNew WHERE id = $Id
我尝试了下面的代码,但不起作用
SELECT binary firstName as currentName from tableNew WHERE id = $Id
你能帮忙吗?
最佳答案
On Unix, table names are case sensitive. On Windows, they are not.
Column, index, and stored routine names are not case sensitive on any platform, nor are column aliases.
关于mysql 区分大小写的字段名查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32779929/