public int nEquipa(String cod_competicao){
          try {
              int i=0;
            Statement stm = conn.createStatement();
            ResultSet rs = stm.executeQuery("SELECT cod_equipa FROM EquipaCampeonato where cod_competicao='"+cod_competicao+"'");
            
            for (; rs.next(); i++);
            rs.close();
            stm.close();
            return i;
        } catch (SQLException e) {
            JOptionPane.showMessageDialog(null, e.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE);
            return -1;
        }
    }