Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. -- TP --
  2. INSERT INTO PILOTE VALUES (8, 'TRULLI', 'Jarno','Italie');
  3. INSERT INTO ECURIE VALUES (6, 'Lotus');
  4. INSERT INTO APPARTENIR VALUES (8, 6, 2010);
  5. INSERT INTO CIRCUIT VALUES (4, 'Albert-Park', 'Australie');
  6. INSERT INTO COURSE VALUES (13, 2010, 'sec',4);
  7. INSERT INTO EFFECTUER VALUES (13, 8, 24);
  8.  
  9. update CIRCUIT_DISTANCE
  10. set distance = 5303
  11. where nuCi = 4;
  12.  
  13. delete from CIRCUIT_DISTANCE
  14. where nuCi = 4;
  15.  
  16. --q9--
  17. drop table circuit_distance;
  18. --q10--
  19. desc course;
  20.  
  21. --Q11--
  22. select table_name from user_tables;
  23. /* q13 La course 14 n'existe pas */
  24. INSERT INTO effectuer VALUES (14, 7, 2);
  25. -- q14 --
  26. alter table pilote
  27. modify nuPilote number(6);
  28. --q14 une colonne doit être vide pour modifier sa longueur max. ou sa précision --
  29. alter table pilote
  30. modify nuPilote number(5);
  31.  
  32. --q15--
  33. alter table circuit
  34. modify paysCi CONSTRAINT nn_circuit_pays not null;
  35.  
  36. alter table appartenir
  37. modify annee default 2010;
  38.  
  39. alter table Appartenir
  40. modify annee constraint ck_ecurie_annee check(annee > 0);
  41.  
  42. --q16--
  43. select constraint_name
  44. from user_constraints
  45. group by CONSTRAINT_NAME;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement