IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

SQL Firebird Discussion :

Supprimer un index


Sujet :

SQL Firebird

  1. #1
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mars 2010
    Messages
    945
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mars 2010
    Messages : 945
    Points : 123
    Points
    123
    Par défaut Supprimer un index
    Bonjour à tous,

    J'arrive pas à supprimer un index secondaire dans une table, il me signale "index non trouvé"
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    alter table ach drop constraint indexa
     
    MESSAGE ERREUR:CONSTRAINT INDEXA does not exist.
    ET POURTANT L'INDEX EXISTE
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
     
    ]
     
    CREATE TABLE ACH
    (
      CAS Integer NOT NULL,
      DAT Date NOT NULL,
      FAC Varchar(30) NOT NULL,
      ORD Integer NOT NULL,
      ANA Varchar(20) CHARACTER SET ISO8859_1,
      MAT Varchar(20) CHARACTER SET ISO8859_1,
      PRO Varchar(20) CHARACTER SET ISO8859_1,
      DES Varchar(255) CHARACTER SET ISO8859_1,
      QTE Numeric(14,5),
      MHT Numeric(14,2),
      COI Integer,
      PER Integer,
      DAP Date,
      CHA Varchar(255) CHARACTER SET ISO8859_1,
      IMA Varchar(35) CHARACTER SET ISO8859_1,
      MON Numeric(14,2),
      OBS Varchar(255) CHARACTER SET ISO8859_1,
      PUA Numeric(14,5),
      COIR Integer,
      DESF Varchar(200) CHARACTER SET ISO8859_1,
      MTB Numeric(14,5),
      TAU Numeric(14,2),
      TVA Numeric(14,5),
      TRE Numeric(14,2),
      REM Numeric(14,5),
      UTI Varchar(50),
      COID Integer,
      COIF Integer,
      PUDEV Numeric(14,6),
      TAUXC Numeric(14,6),
      FRATRANS Numeric(14,6),
      FRADOU Numeric(14,6),
      FRAMAN Numeric(14,6),
      FRAAUT Numeric(14,6),
      DEVISE Varchar(15),
      FRATRANSP Numeric(14,6),
      PRIMARY KEY (CAS,DAT,FAC,ORD)
    );
    CREATE INDEX "indexa" ON ACH (PRO,DES);
    Images attachées Images attachées  

  2. #2
    Expert éminent sénior
    Homme Profil pro
    Responsable Données
    Inscrit en
    Janvier 2009
    Messages
    5 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Responsable Données

    Informations forums :
    Inscription : Janvier 2009
    Messages : 5 198
    Points : 12 774
    Points
    12 774
    Par défaut
    Bonjour,
    Dans ton code tu essaies de supprimer une contrainte, alors que tu veux supprimer un index.
    Il ne faut pas plutôt lancer un DROP INDEX ?

    Tatayo

  3. #3
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mars 2010
    Messages
    945
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mars 2010
    Messages : 945
    Points : 123
    Points
    123
    Par défaut
    Bonjour,

    Avec DROP INDEX
    Images attachées Images attachées  

  4. #4
    Expert éminent sénior
    Homme Profil pro
    Responsable Données
    Inscrit en
    Janvier 2009
    Messages
    5 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Responsable Données

    Informations forums :
    Inscription : Janvier 2009
    Messages : 5 198
    Points : 12 774
    Points
    12 774
    Par défaut
    D'après ce que j'ai trouvé il ne faut pas faire e ALTER TABLE, mais directement un DROP INDEX.

    Tatayo.

  5. #5
    Rédacteur/Modérateur

    Avatar de SergioMaster
    Homme Profil pro
    Développeur informatique retraité
    Inscrit en
    Janvier 2007
    Messages
    15 042
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 67
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique retraité
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2007
    Messages : 15 042
    Points : 40 952
    Points
    40 952
    Billets dans le blog
    62
    Par défaut
    Bonjour,

    je parce que, avec flamerobin, il est très facile de trouver la solution
    Nom : Capture.PNG
Affichages : 299
Taille : 51,7 Ko
    qui exécutera DROP INDEX c.q.f.d.

    Étonnamment ce n'est pas dans la documentation officielle de certaines versions (2.x) pourtant cela existe depuis l'origine (Interbase 6 fork)
    MVP Embarcadero
    Delphi installés : D3,D7,D2010,XE4,XE7,D10 (Rio, Sidney), D11 (Alexandria), D12 (Athènes)
    SGBD : Firebird 2.5, 3, SQLite
    générateurs États : FastReport, Rave, QuickReport
    OS : Window Vista, Windows 10, Windows 11, Ubuntu, Androïd

  6. #6
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mars 2010
    Messages
    945
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mars 2010
    Messages : 945
    Points : 123
    Points
    123
    Par défaut
    Autant pour moi, ça marche, merci a vous deux.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. supprimer des index full text
    Par galsen3 dans le forum Administration
    Réponses: 1
    Dernier message: 16/06/2009, 06h20
  2. Réponses: 5
    Dernier message: 02/07/2007, 15h28
  3. Supprimer tous les index
    Par TangoZoulou dans le forum Requêtes
    Réponses: 7
    Dernier message: 19/03/2007, 11h26
  4. URGENT : Supprimer index ordonné en cluster
    Par adjava dans le forum MS SQL Server
    Réponses: 4
    Dernier message: 18/05/2005, 15h00

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo