1、得到查询结果,一个数据集

rs = stat.executeQuery("select * from "
                            + table_name + " limit " + pageNum + ",500");

2、得到结果集的结构信息,比如字段数、字段名等。

ResultSetMetaData rsmt=rs.getMetaData();

3、使用rs.getMetaData().getTableName(1))就可以返回表名
4、rs.getMetaData().getColumnCount()字段数
5、rs.getMetaData().getColumnName(i));字段名

相关文章:

  • 2021-10-20
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-16
  • 2021-12-15
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2021-09-06
相关资源
相似解决方案