SHARE
TWEET

Untitled

a guest Oct 18th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. INSERT INTO school (name, capacity, country)
  2. VALUES ('Beauxbatons Academy of Magic', 550, 'France'),
  3. ('Castelobruxo', 380, 'Brazil'),
  4. ('Durmstrang Institue', 570, 'Norway'),
  5. ('Hogwarts School of Witchcraft', 450, 'United Kingdom'),
  6. ('Ilvermorny School of Witchcraft', 300, 'USA'),
  7. ('Koldovstoretz', 124, 'Russia'),
  8. VALUES('Mahoutokoro School of Magic', 800, 'Japan')
  9. ('Uagadou School of Magic', 350, 'Uganda);
  10.  
  11. mysql> UPDATE SCHOOL
  12.     -> SET country='Sweden'
  13.     -> WHERE id=3;
  14. Query OK, 1 row affected (0,00 sec)
  15. Rows matched: 1  Changed: 1  Warnings: 0
  16.  
  17. mysql> UPDATE school
  18.     -> SET capacity=700
  19.     -> WHERE id=7;
  20. Query OK, 1 row affected (0,00 sec)
  21. Rows matched: 1  Changed: 1  Warnings: 0
  22.  
  23. mysql> DELETE FROM school
  24.     -> WHERE name LIKE '% Magic';
  25. Query OK, 3 rows affected (0,00 sec)
  26.  
  27. mysql> SELECT * FROM school;
  28. +----+--------------------------------------------+----------+----------------+
  29. | id | name                                       | capacity | country        |
  30. +----+--------------------------------------------+----------+----------------+
  31. |  2 | Castelobruxo                               |      380 | Brazil         |
  32. |  3 | Durmstrang Institue                        |      570 | Sweden         |
  33. |  4 | Hogwarts School of Witchcraft and Wizardry |      450 | United Kingdom |
  34. |  5 | Hogwarts School of Witchcraft and Wizardry |      300 | USA            |
  35. |  6 | Koldovstoretz                              |      124 | Russia         |
  36. +----+--------------------------------------------+----------+----------------+
  37. 5 rows in set (0,01 sec)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top