SHARE
TWEET

Untitled

a guest May 24th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mysql> INSERT into school (name, country, capacity) VALUES
  2.     -> ('Beauxbatons Academy of Magic','France',550),
  3.     -> ('Castelobruxo', 'Brazil', 380),
  4.     -> ('Durmstag Institute', 'Norway',570),
  5.     -> ('Hogwarts School of Witchcraft and Wizardry','United Kingdom',450),
  6.     -> ('Ilvermorny School of Withcraft and Wizardy','USA',300),
  7.     -> ('Koldovstoretz','Russia',125),
  8.     -> ('Mahoutokoro School of Magic','Japan',800),
  9.     -> ('Uagadou School of Magic','Uganda',350);
  10. Query OK, 8 rows affected (0.00 sec)
  11. Records: 8  Duplicates: 0  Warnings: 0
  12.  
  13. mysql> select * from school;
  14. +----+--------------------------------------------+----------+----------------+
  15. | id | name                                       | capacity | country        |
  16. +----+--------------------------------------------+----------+----------------+
  17. |  1 | Beauxbatons Academy of Magic               |      550 | France         |
  18. |  2 | Castelobruxo                               |      380 | Brazil         |
  19. |  3 | Durmstag Institute                         |      570 | Norway         |
  20. |  4 | Hogwarts School of Witchcraft and Wizardry |      450 | United Kingdom |
  21. |  5 | Ilvermorny School of Withcraft and Wizardy |      300 | USA            |
  22. |  6 | Koldovstoretz                              |      125 | Russia         |
  23. |  7 | Mahoutokoro School of Magic                |      800 | Japan          |
  24. |  8 | Uagadou School of Magic                    |      350 | Uganda         |
  25. +----+--------------------------------------------+----------+----------------+
  26. 8 rows in set (0.00 sec)
  27.  
  28. mysql> UPDATE school SET country='Sweden' Where id=3;
  29. Query OK, 1 row affected (0.01 sec)
  30. Rows matched: 1  Changed: 1  Warnings: 0
  31.  
  32. mysql> UPDATE school SET capacity=700 WHERE id=7;
  33. Query OK, 1 row affected (0.01 sec)
  34. Rows matched: 1  Changed: 1  Warnings: 0
  35.  
  36. mysql> DELETE FROM school WHERE name LIKE '%magic';
  37. Query OK, 3 rows affected (0.00 sec)
  38.  
  39. mysql> SELECT * FROM school;
  40. +----+--------------------------------------------+----------+----------------+
  41. | id | name                                       | capacity | country        |
  42. +----+--------------------------------------------+----------+----------------+
  43. |  2 | Castelobruxo                               |      380 | Brazil         |
  44. |  3 | Durmstag Institute                         |      570 | Sweden         |
  45. |  4 | Hogwarts School of Witchcraft and Wizardry |      450 | United Kingdom |
  46. |  5 | Ilvermorny School of Withcraft and Wizardy |      300 | USA            |
  47. |  6 | Koldovstoretz                              |      125 | Russia         |
  48. +----+--------------------------------------------+----------+----------------+
  49. 5 rows in set (0.00 sec)
  50.  
  51. mysql>
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