首页 > 其他 > 详细

读取数据表

时间:2021-03-31 13:57:47      阅读:27      评论:0      收藏:0      [点我收藏+]

读取数据表

public static void searchAllTable() {
        //String sql="SELECT * FROM information_schema.`TABLES`";
        String sql="select table_name from information_schema.tables where table_schema=‘vc_2021030601‘;";
        
        MySQLConnect.connectMySQL();
        ResultSet rs=MySQLConnect.runSQL(sql);
        
        
        try {
            while (rs.next()) {
                String tableName = rs.getString(1);
                if(tableName.startsWith("r_")) {
                    continue;
                }
                
                if(tableName.startsWith("t_")) {
                    continue;
                }
                //System.out.println(""+tableName+"");
                listTables.add(tableName);
            }
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
        MySQLConnect.close();
        
    }

 

读取数据表

原文:https://www.cnblogs.com/herd/p/14600903.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!