rotti321

S3->S5 + exemple

Oct 21st, 2021
864
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Subiectul 3
  2.  
  3. 2) SELECT `Clasa` FROM `scoala` WHERE `Nume`="Ionescu Dan"
  4.  
  5. 3) SELECT `Nume` FROM `scoala` WHERE `Clasa`=(SELECT `Clasa` FROM `scoala` WHERE `Nume`="Ionescu Dan")
  6.  
  7. Subiectul 4
  8.  
  9. 2) SELECT * FROM `scoala` WHERE `Varsta`>18
  10.  
  11. 3) SELECT * FROM `scoala` order by `Varsta`DESC
  12.  
  13. Subiect 5
  14. 2) UPDATE `examen` SET `MEDIA`=(`NOTA1`+`NOTA2`)/2 WHERE `NOTA1`>=5 AND `NOTA2`>=5
  15.  
  16. 3) SELECT * FROM `examen` WHERE `MEDIA`>=5 ORDER BY `NUME`ASC
  17.  
  18. EXERCITIU DE ADMIRATIE
  19. --> Afiseaza toti elevii majori din XIIA
  20. SELECT * FROM  `scoala` WHERE `Clasa`="XIIA" AND `Varsta`>=18
  21.  
  22. --> Afiseaza elevii din XIIA, respectiv XIIB
  23. SELECT * FROM `scoala` WHERE `Clasa`="XIIA" OR`Clasa`="XIIB"
  24.  
  25.  
RAW Paste Data