这个是我的代码:
public class CallableStatementTest {
public static void main(String[] args) {
test1();
}
static void test1(){
Connection con=DButil.open();
try {
CallableStatement cstmt=con.prepareCall("{call all_people()}");
ResultSet rs=cstmt.executeQuery();
while(rs.next())
{
String id=rs.getString(1);
String name=rs.getString(2);
System.out.println(id+","+name);
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
DButil.close(con);
}
}
出现的问题:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION all_people does not exist
谢谢了