当前位置: 技术问答>java相关
如何判断一个表是否为空,也就是说,表中没有纪录???
来源: 互联网 发布时间:2017-04-16
本文导语: 如何判断一个表是否为空,也就是说,表中没有纪录??? 部分代码: ResultSet rs1; rs1 = list.executeQuery("select CLIENTID,CLIENTNAME,CLIENTADDRESS,clientmanage,clientmanage_ph,clienttechnician,clienttechnician_ph,technician_mail,remark from CLIENTINF...
如何判断一个表是否为空,也就是说,表中没有纪录???
部分代码:
ResultSet rs1;
rs1 = list.executeQuery("select CLIENTID,CLIENTNAME,CLIENTADDRESS,clientmanage,clientmanage_ph,clienttechnician,clienttechnician_ph,technician_mail,remark from CLIENTINFO");
......
if(rs1.wasNull())?????
部分代码:
ResultSet rs1;
rs1 = list.executeQuery("select CLIENTID,CLIENTNAME,CLIENTADDRESS,clientmanage,clientmanage_ph,clienttechnician,clienttechnician_ph,technician_mail,remark from CLIENTINFO");
......
if(rs1.wasNull())?????
|
if(!rs1.next())
System.out.println("无记录!");
System.out.println("无记录!");