Advertisement
bebesurf

Fin du TD2 pour Antoine le BG

Feb 20th, 2018
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.78 KB | None | 0 0
  1. /* Test messages erreur des clefs primaires*/
  2. INSERT INTO employe2 VALUES (20, 'Jean', 30, 3);
  3. INSERT INTO projet2 VALUES (103, 'Venom', 5);
  4. INSERT INTO service2 VALUES (1, 'Communication', 17);
  5. INSERT INTO travail2 VALUES (20, 492, 20);
  6.  
  7.  
  8. /* Test messages erreur des clefs étrangères*/
  9. INSERT INTO employe2 VALUES (89, 'Antoine',35 ,6);
  10. INSERT INTO projet2 VALUES (118, 'Alpha',99);
  11. INSERT INTO travail2 VALUES (888, 492,20);
  12. INSERT INTO travail2 VALUES (20, 800, 40);
  13.  
  14. alter table projet2 drop column nuproj;
  15. alter table employe2 drop column nuempl;
  16. alter table service2 drop column nuserv;
  17.  
  18.  
  19. /* Questions après les tableaux (manque 1 requête il me semble) */
  20. alter table employe2 add constraint U_employe UNIQUE(nuempl, affect);
  21. alter table employe2 add check(hebdo <= 35);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement