1. Error description
caused by:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:Incorrect parameter count in the-native fun Ction ' ISNULL ' at Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at Sun.reflect.NativeConstructorAccessorImpl.newInstance (nativeconstructoraccessorimpl.java:57) at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (delegatingconstructoraccessorimpl.java:45) at Java.lang.reflect.Constructor.newInstance (constructor.java:526) at Com.mysql.jdbc.Util.handleNewInstance ( util.java:411) at Com.mysql.jdbc.Util.getInstance (util.java:386) at Com.mysql.jdbc.SQLError.createSQLException ( sqlerror.java:1053) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (mysqlio.java:4074) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (mysqlio.java:4006) at Com.mysql.jdbc.MysqlIO.sendCommand (Mysqlio.java : 2468) at Com.mysql.jdbc.MysqlIO.sqlQueryDirect (mysqlio.java:2629) at Com.mysql.jdbc.ConnectionImpl.execSQL ( connectionimpl.java:2713) at Com.mysql.jdbc.StatementImpl.executeUpdate (Statementimpl.java:1794) at Com.mysql.jdbc.StatementImpl.executeUpdate (statementimpl.java:1712) at Org.apache.commons.dbcp.DelegatingStatement.executeUpdate (delegatingstatement.java:225)
1 queries executed, 0 success, 1 errors, 0 warnings query: SELECT COUNT (IsNull (Depart_teacher, ')) from T_depart_info LIMIT 0, 1000 error code: 1582Incorrect parameter count in the native function ' isnull ' execution time : 0 sec Transmission : 0 sec Total Duration : 0 Sec
2. Cause of error
There are differences between IsNull and Ifnull in MySQL:
IsNull is only used to determine whether it is empty, can not implement the replacement function, and ifnull can not only be used to determine whether it is empty, but also to implement the replacement function.
3. Solutions
Modify IsNull to Ifnull
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Incorrect parameter count in the native function ' ISNULL '