Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. mysql> INSERT INTO SCHOOL (name, country, capacity)
  2. -> VALUES ('Beauxbatons Academy of Magic', 'France', 550),
  3. -> ('Castelobruxo', 'Brazil', 380),
  4. -> ('Durmstrang Institute', 'Norway', 570),
  5. -> ('Hogwarts School of Witchcraft and Wizardry', 'United Kingdom', 450),
  6. -> ('Ilvermorny School of Witchcraft and Wizardry', 'USA', 300),
  7. -> ('Koldovstoretz', 'Russia', 125),
  8. -> ('Mahoutokoro School of Magic', 'Japan', 800),
  9. -> ('Uagadou School of Magic', 'Uganda', 350);
  10.  
  11. mysql> UPDATE school
  12. SET country='Sweden'
  13. WHERE id=3;
  14.  
  15. mysql> UPDATE school
  16. -> SET capacity=700
  17. -> WHERE id=7;
  18.  
  19. mysql> DELETE FROM school
  20. WHERE name LIKE "%Magic%";
  21.  
  22. mysql> SELECT * FROM school;
  23. +----+----------------------------------------------+----------+----------------+
  24. | id | name | capacity | country |
  25. +----+----------------------------------------------+----------+----------------+
  26. | 2 | Castelobruxo | 380 | Brazil |
  27. | 3 | Durmstrang Institute | 570 | Sweden |
  28. | 4 | Hogwarts School of Witchcraft and Wizardry | 450 | United Kingdom |
  29. | 5 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA |
  30. | 6 | Koldovstoretz | 125 | Russia |
  31. +----+----------------------------------------------+----------+----------------+
  32. 5 rows in set (0,00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement