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

Administration Oracle Discussion :

[oracle 10g] creation d'une table


Sujet :

Administration Oracle

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    302
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 302
    Par défaut [oracle 10g] creation d'une table
    bonjour,

    Sous oracle 10g j'ai crée une table, quand je l'exécute il me met bien que ma table est crée et pourtant quand j'insere ensuite mes valeurs il me met table ou vue inexistante.
    je ne comprend pas, pouvez vous m'aider?
    merci d'avance

    pepsister

  2. #2
    Membre Expert

    Homme Profil pro
    Chef de projet en SSII
    Inscrit en
    Janvier 2004
    Messages
    2 862
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Chef de projet en SSII
    Secteur : Conseil

    Informations forums :
    Inscription : Janvier 2004
    Messages : 2 862
    Par défaut
    Peux-tu nous mettre ton script de création, d'insertion et l'erreur obtenue, STP?

  3. #3
    Expert éminent
    Avatar de orafrance
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    15 967
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Par défaut
    préfixe la table avec le nom du owner.

  4. #4
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    302
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 302
    Par défaut creation table
    dsl j'ai renvoyé ce msg ailleurs
    voici ma création et mon insertion

    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
    CREATE TABLE C (
    NUMCONSEIL 	NUMBER (4),
    DEBUTC 		DATE,
    FINC 		DATE,
    CONSTRAINT C_PRIMARY_KEY PRIMARY KEY (NUMCONSEIL));
    INSERT INTO C VALUES (1002,TO_DATE('01-01-2002','dd.mm.yyyy'),TO_DATE('12-12-2006','dd.mm.yyyy'));
    INSERT INTO C VALUES (1003,TO_DATE('12-03-2001','dd.mm.yyyy'),TO_DATE('30-12-05','dd.mm.yyyy'));
     
    CREATE TABLE MEMBREC (
    NUMMEMBREC 	NUMBER (4),
    NOMMEMBREC 	CHAR (12) NOT NULL,
    FONCTION 	CHAR (18),
    NUMCONSEIL 	NUMBER (4),
    CONSTRAINT MEMBREC_FOREIGN_KEY FOREIGN KEY (NUMCONSEIL) REFERENCES C (NUMCONSEIL),
    CONSTRAINT MEMBREC_PRIMARY_KEY PRIMARY KEY (NUMMEMBREC));
    INSERT INTO MEMEBREC VALUES (2000,'TURNER','PRESIDENT',1004);
    INSERT INTO MEMEBREC VALUES (2001,'JAMES','SECRETAIRE',1005);
    INSERT INTO MEMEBREC VALUES (2002,'WARD','SECRETAIRE',1006);
    INSERT INTO MEMEBREC VALUES (2003,'MULLER','TRESORIER',1002);
    INSERT INTO MEMEBREC VALUES (2004,'DURAND','ADMINISTRATEUR',1003);
    INSERT INTO MEMEBREC VALUES (2005,'DUBOIS','TRESORIER',1003);
    INSERT INTO MEMEBREC VALUES (2006,'THOMPSON','PRESIDENT',1003);
    INSERT INTO MEMEBREC VALUES (2007,'THOMAS','ADMINISTRATEUR',1002);
    Ce que oracle m'affiche

    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
    Number Ecoulé Instruction Informations en retour Lignes 
    1 0,03 CREATE TABLE C ( NUMCONSEIL NUMBER (4), DEBUTC DATE, FINC Table créée. 0 
    2 0,01 INSERT INTO C VALUES (1002,TO_DATE('01-01-2002','dd.mm.yyyy' 1 ligne(s) insérée(s). 1 
    3 0,00 INSERT INTO C VALUES (1003,TO_DATE('12-03-2001','dd.mm.yyyy' 1 ligne(s) insérée(s). 1 
    4 0,03 CREATE TABLE MEMBREC ( NUMMEMBREC NUMBER (4), NOMMEMBREC C Table créée. 0 
    5 0,03 INSERT INTO MEMEBREC VALUES (2000,'TURNER','PRESIDENT',1004) ORA-00942: Table ou vue inexistante -  
    6 0,03 INSERT INTO MEMEBREC VALUES (2001,'JAMES','SECRETAIRE',1005) ORA-00942: Table ou vue inexistante -  
    7 0,04 INSERT INTO MEMEBREC VALUES (2002,'WARD','SECRETAIRE',1006)  ORA-00942: Table ou vue inexistante -  
    8 0,03 INSERT INTO MEMEBREC VALUES (2003,'MULLER','TRESORIER',1002) ORA-00942: Table ou vue inexistante -  
    9 0,03 INSERT INTO MEMEBREC VALUES (2004,'DURAND','ADMINISTRATEUR', ORA-00942: Table ou vue inexistante -  
    10 0,03 INSERT INTO MEMEBREC VALUES (2005,'DUBOIS','TRESORIER',1003) ORA-00942: Table ou vue inexistante -  
    11 0,03 INSERT INTO MEMEBREC VALUES (2006,'THOMPSON','PRESIDENT',100 ORA-00942: Table ou vue inexistante -  
    12 0,03 INSERT INTO MEMEBREC VALUES (2007,'THOMAS','ADMINISTRATEUR', ORA-00942: Table ou vue inexistante -  
      ligne(s) 1 - 12 de 12    
     
     
    Instructions traitées 12 
    Succès 4 
    Avec erreurs 8
    j'ai aussi un probleme sur l'utilisation du check in puis je avoir une bref explication de l'utilisation
    merci d'avance

  5. #5
    Membre Expert

    Profil pro
    Inscrit en
    Février 2006
    Messages
    3 437
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 3 437
    Par défaut
    CREATE TABLE MEMBREC (
    NUMMEMBREC NUMBER (4),
    NOMMEMBREC CHAR (12) NOT NULL,
    FONCTION CHAR (18),
    NUMCONSEIL NUMBER (4),
    CONSTRAINT MEMBREC_FOREIGN_KEY FOREIGN KEY (NUMCONSEIL) REFERENCES C (NUMCONSEIL),
    CONSTRAINT MEMBREC_PRIMARY_KEY PRIMARY KEY (NUMMEMBREC));
    INSERT INTO MEMEBREC VALUES (2000,'TURNER','PRESIDENT',1004);
    INSERT INTO MEMEBREC VALUES (2001,'JAMES','SECRETAIRE',1005);
    INSERT INTO MEMEBREC VALUES (2002,'WARD','SECRETAIRE',1006);
    INSERT INTO MEMEBREC VALUES (2003,'MULLER','TRESORIER',1002);
    INSERT INTO MEMEBREC VALUES (2004,'DURAND','ADMINISTRATEUR',1003);
    INSERT INTO MEMEBREC VALUES (2005,'DUBOIS','TRESORIER',1003);
    INSERT INTO MEMEBREC VALUES (2006,'THOMPSON','PRESIDENT',1003);
    INSERT INTO MEMEBREC VALUES (2007,'THOMAS','ADMINISTRATEUR',1002);
    Le nom de la table c'est MEMBREC ou MEMEBREC ?

  6. #6
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    302
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 302
    Par défaut
    merci beaucoup en effet c'était cela.
    Par contre j'ai deux petites questions:
    voici deux tables de creation
    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
    CREATE TABLE DEPT (
     DEPTNO              NUMBER(2) NOT NULL,
     DNAME               CHAR(14),
     LOC                 CHAR(13),
    CONSTRAINT DEPT_PRIMARY_KEY PRIMARY KEY (DEPTNO));
     
    CREATE TABLE EMP (
     EMPNO               NUMBER(4) NOT NULL,
     ENAME               CHAR(10),
     JOB                 CHAR(9),
     MGR                 NUMBER(4),
     HIREDATE            DATE,
     SAL                 NUMBER(7,2),
     COMM                NUMBER(7,2),
     DEPTNO              NUMBER(2) NOT NULL,
     CONSTRAINT EMP_SELF_KEY FOREIGN KEY (MGR) REFERENCES EMP (EMPNO),
     CONSTRAINT EMP_FOREIGN_KEY FOREIGN KEY (DEPTNO) REFERENCES DEPT (DEPTNO),
     CONSTRAINT EMP_PRIMARY_KEY PRIMARY KEY (EMPNO));
     
    si je tape:
    CREATE TABLE DEPT (
     DEPTNO              NUMBER(2) PRIMARY KEY,
     DNAME               CHAR(14),
     LOC                 CHAR(13));
     
     
    CREATE TABLE EMP (
     EMPNO               NUMBER(4) PRIMARY KEY,
     ENAME               CHAR(10),
     JOB                 CHAR(9),
     MGR                 NUMBER(4) FOREIGN KEY REFERENCES EMP (EMPNO),
     HIREDATE            DATE,
     SAL                 NUMBER(7,2),
     COMM                NUMBER(7,2),
     DEPTNO              NUMBER(2) FOREIGN KEY REFERENCES DEPT (deptno));
    ici il me met parenthese manquante je ne comprends pas pourquoi ca ne marcherais pas.
    De plus pour job on a le choix entre 3 job
    pourquoi il ne reconnait pas l'instruction:
    JOB CHAR (9) CHACK JOB IN ('SALESMAN','MANAGER','PRESIDENT'),
    merci encore une fois

Discussions similaires

  1. [Oracle 10G] Verou sur une table
    Par shaun_the_sheep dans le forum Oracle
    Réponses: 3
    Dernier message: 08/04/2010, 10h30
  2. Réponses: 0
    Dernier message: 31/10/2009, 09h59
  3. [MySQL] Creation d'une table ?
    Par artotal dans le forum PHP & Base de données
    Réponses: 6
    Dernier message: 28/10/2005, 17h04
  4. Creation d'une table avec plusieurs clés
    Par mic79 dans le forum Langage SQL
    Réponses: 6
    Dernier message: 21/06/2005, 11h17
  5. Réponses: 2
    Dernier message: 02/11/2004, 12h38

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