如下:
Statement stmtB = con.createStatement();
ResultSet rsB = stmtB.executeQuery("select count(*) from 菜單資料表 where 是否刪除 != 'N';
while(rsB.next())
int count = rsB.getInt(1);
or
while(rsB.next())
int count = rsB.getInt("total");
iThome鐵人賽