我的Java代码中有以下查询:
String queryString = "select \r\n" +
"cms.status_id as 'statusId',\r\n" +
"cms.status_label as 'statusLabel',\r\n" +
"csl.status as 'status',\r\n" +
"from "+client+".my_status cms \r\n" +
"join "+client+".status_list csl on csl.status = cms.status_id\r\n";
当我运行代码时,出现以下错误:
SQL Error: 1064, SQLState: 42000
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
是什么原因造成的?我看不到查询问题,可以手动进行操作。
您在此行中还有一个逗号:
"csl.status as 'status',\r\n" +
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句