:“You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versi

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yujing1314/article/details/84979579

今天用C#连接数据库的时候,想把字段名改成中文,结果就报这个错误了,:“You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘??? FROM tik_integral_detail’ at line 1”

解决方案

mycom.CommandText = "SELECT id AS `用户名` FROM tik_integral_detail";

在英文状态下输入`,这个符号是键盘左边数字键1的左边那个符号(只能在英文状态下解决)

猜你喜欢

转载自blog.csdn.net/yujing1314/article/details/84979579