private int getColumns(String tabla) {
        int columns = -1;
        String query = "SELECT Count(*) as total FROM INFORMATION_SCHEMA.Columns where TABLE_NAME='" + tabla + "' AND table_schema='" + vg.baseDeDatos + "'  GROUP BY column_default";
        try {
            PreparedStatement pstm = (PreparedStatement) conectar().prepareStatement(query);
            ResultSet res = pstm.executeQuery();
            res.next();
            columns = res.getInt("total");
            res.close();
        } catch (SQLException e) {
            System.out.println("Problemas al obtener el numero de columnas:\n" + e);
        }
        return columns;
    }