PreparedStatement遇到语法错误java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check

8以上版本
错误写法:

sql = con.prepareStatement("select  *from test.ts"+ "where number =?");

正确

sql = con.prepareStatement("select  *from test.ts where number =?");
发布了73 篇原创文章 · 获赞 81 · 访问量 9987

猜你喜欢

转载自blog.csdn.net/qq_41910353/article/details/102685416