比如select max(autoid) as autoid from yc_module
select count(*) as count from yc_module
然后用rs.getString(count)或rs.getString(autoid)才能取到
本文介绍了如何使用SQL进行数据查询,包括获取最大ID和记录总数的方法。通过示例展示了如何利用SELECT MAX()和SELECT COUNT(*)来实现这些操作,并解释了如何通过结果集获取具体数值。
比如select max(autoid) as autoid from yc_module
select count(*) as count from yc_module
然后用rs.getString(count)或rs.getString(autoid)才能取到
1008
4452