Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 ‘=‘小美‘‘ at line 1
sb.append("select * from imooc_goddess");
sb.append("where user_name =?");
报错
加个空格就解决了
sb.append(" select * from imooc_goddess ");
sb.append(" where user_name =? ");
时间: 2024-10-05 18:30:38