java.sql.SQLSyntaxErrorException: 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 'OVER() AS ROW_ID FROM ( SELECT crid,crtime,carcode,address,state,pname,tel,illco' at line 1
时间: 2023-10-16 07:59:05 浏览: 89
这个错误是由于你的 SQL 语法错误引起的。根据错误信息来看,问题可能出现在 "OVER()" 这个地方附近。在 MySQL 中,"OVER()" 是用于窗口函数的,而你的语句可能没有正确使用窗口函数。请检查你的 SQL 语句,确保窗口函数的使用是正确的。如果你能提供更多的 SQL 语句和相关上下文,我可以帮你更详细地解决这个问题。
相关问题
java.sql.SQLSyntaxErrorException: 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 'insert into t_salary_2021_01( DETAILID) values('52dd5ce4a5794573b9b202a2f00788e4' at line 2
java.sql.SQLSyntaxErrorException: 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 '? and password=?' at line 1
这个错误提示通常表示您的SQL语句存在语法错误。根据您提供的信息,问题可能出在您的SQL语句中的占位符上。请确保您的SQL语句中有两个占位符(?),并且它们被正确地使用。另外,您还需要确保占位符的顺序与后面传递的参数顺序一致。
另外,如果您使用的是PreparedStatement预编译语句,那么请确保您已经调用了setString等方法来设置占位符的值。例如,您可以像下面这样来设置占位符的值:
```
String sql = "select * from user where username=? and password=?";
PreparedStatement pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "your_username");
pstmt.setString(2, "your_password");
ResultSet rs = pstmt.executeQuery();
```
如果问题依然存在,建议您提供更详细的错误信息以及相关代码,以便更好地定位问题。