Advertisement
Guest User

Untitled

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