我想知道,同时从数据库在Java(JDBC)发射选择查询。假设 执行(查询)返回没有行然后结果集的值是什么目的???是空还是可以是其他?回复请结果集的值现在获取现在行的表格数据库
Statement statement = connection.createStatement();
ResultSet result = statement.executeQuery("select * from people");
我想知道,同时从数据库在Java(JDBC)发射选择查询。假设 执行(查询)返回没有行然后结果集的值是什么目的???是空还是可以是其他?回复请结果集的值现在获取现在行的表格数据库
Statement statement = connection.createStatement();
ResultSet result = statement.executeQuery("select * from people");
当你跑这个,假设人们桌子是空的,你得到了什么? – rajesh 2013-04-08 05:19:26
不应该为空,它是空的。你可以随时运行代码并检查。 – 2013-04-08 05:21:17