怎么找到外国人聊天:关于jsp中使用SQL语法

来源:百度文库 编辑:高考问答 时间:2024/05/13 17:32:45
<%String sql="select COUNT(*) AS count_rec from shop_action ;
ResultSet rs=stmt.executeQuery(sql);
if(rs.next()){
String rec_count=rs.getString("count_rec");}%>
请问我怎么才能得到count(*)的值?

将查询结果放在DataSet中