SHARE
TWEET

Untitled

a guest Apr 25th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mysql> INSERT INTO school (name, country, capacity) VALUES ('Beauxbatons Academy of Magic', 'France', 550), ('Castelobruxo', 'Brazil', 380), ('Durmstrang Institue', 'Norway', 570), ('Hogwarts School of Witchcraft and Wizardry', 'United Kingdom', 450), ('Ilvermorny School of Witchcraft and Wizardry', 'USA', 300), ('Koldovstoretz', 'Russia', 125), ('Mahoutokoro School of Magic', 'Japan', 800),   ('Uagadou School of Magic', 'Uganda', 350);
  2. Query OK, 8 rows affected (0.00 sec)
  3. Records: 8  Duplicates: 0  Warnings: 0
  4.  
  5. mysql> SELECT * FROM school;
  6. +----+----------------------------------------------+----------+----------------+
  7. | id | name                                         | capacity | country        |
  8. +----+----------------------------------------------+----------+----------------+
  9. |  1 | Beauxbatons Academy of Magic                 |      550 | France         |
  10. |  2 | Castelobruxo                                 |      380 | Brazil         |
  11. |  3 | Durmstrang Institue                          |      570 | Norway         |
  12. |  4 | Hogwarts School of Witchcraft and Wizardry   |      450 | United Kingdom |
  13. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  14. |  6 | Koldovstoretz                                |      125 | Russia         |
  15. |  7 | Mahoutokoro School of Magic                  |      800 | Japan          |
  16. |  8 | Uagadou School of Magic                      |      350 | Uganda         |
  17. +----+----------------------------------------------+----------+----------------+
  18. 8 rows in set (0.00 sec)
  19.  
  20. mysql> UPDATE school
  21.     -> SET country='Sweden'
  22.     -> WHERE id=3;
  23. Query OK, 1 row affected (0.00 sec)
  24. Rows matched: 1  Changed: 1  Warnings: 0
  25.  
  26. mysql> SELECT * FROM school;
  27. +----+----------------------------------------------+----------+----------------+
  28. | id | name                                         | capacity | country        |
  29. +----+----------------------------------------------+----------+----------------+
  30. |  1 | Beauxbatons Academy of Magic                 |      550 | France         |
  31. |  2 | Castelobruxo                                 |      380 | Brazil         |
  32. |  3 | Durmstrang Institue                          |      570 | Sweden         |
  33. |  4 | Hogwarts School of Witchcraft and Wizardry   |      450 | United Kingdom |
  34. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  35. |  6 | Koldovstoretz                                |      125 | Russia         |
  36. |  7 | Mahoutokoro School of Magic                  |      800 | Japan          |
  37. |  8 | Uagadou School of Magic                      |      350 | Uganda         |
  38. +----+----------------------------------------------+----------+----------------+
  39. 8 rows in set (0.00 sec)
  40.  
  41. mysql> UPDATE school
  42.     -> SET capacity=700
  43.     -> WHERE id=7;
  44. Query OK, 1 row affected (0.00 sec)
  45. Rows matched: 1  Changed: 1  Warnings: 0
  46.  
  47. mysql> SELECT * FROM school;
  48. +----+----------------------------------------------+----------+----------------+
  49. | id | name                                         | capacity | country        |
  50. +----+----------------------------------------------+----------+----------------+
  51. |  1 | Beauxbatons Academy of Magic                 |      550 | France         |
  52. |  2 | Castelobruxo                                 |      380 | Brazil         |
  53. |  3 | Durmstrang Institue                          |      570 | Sweden         |
  54. |  4 | Hogwarts School of Witchcraft and Wizardry   |      450 | United Kingdom |
  55. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  56. |  6 | Koldovstoretz                                |      125 | Russia         |
  57. |  7 | Mahoutokoro School of Magic                  |      700 | Japan          |
  58. |  8 | Uagadou School of Magic                      |      350 | Uganda         |
  59. +----+----------------------------------------------+----------+----------------+
  60. 8 rows in set (0.00 sec)
  61.  
  62. mysql> DELETE FROM school
  63.     -> WHERE name='Magic';
  64. Query OK, 0 rows affected (0.00 sec)
  65.  
  66. mysql> SELECT * FROM school;
  67. +----+----------------------------------------------+----------+----------------+
  68. | id | name                                         | capacity | country        |
  69. +----+----------------------------------------------+----------+----------------+
  70. |  1 | Beauxbatons Academy of Magic                 |      550 | France         |
  71. |  2 | Castelobruxo                                 |      380 | Brazil         |
  72. |  3 | Durmstrang Institue                          |      570 | Sweden         |
  73. |  4 | Hogwarts School of Witchcraft and Wizardry   |      450 | United Kingdom |
  74. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  75. |  6 | Koldovstoretz                                |      125 | Russia         |
  76. |  7 | Mahoutokoro School of Magic                  |      700 | Japan          |
  77. |  8 | Uagadou School of Magic                      |      350 | Uganda         |
  78. +----+----------------------------------------------+----------+----------------+
  79. 8 rows in set (0.00 sec)
  80.  
  81. mysql> DELETE FROM school WHERE name > 'Magic';
  82. Query OK, 2 rows affected (0.00 sec)
  83.  
  84. mysql> SELECT * FROM school;
  85. +----+----------------------------------------------+----------+----------------+
  86. | id | name                                         | capacity | country        |
  87. +----+----------------------------------------------+----------+----------------+
  88. |  1 | Beauxbatons Academy of Magic                 |      550 | France         |
  89. |  2 | Castelobruxo                                 |      380 | Brazil         |
  90. |  3 | Durmstrang Institue                          |      570 | Sweden         |
  91. |  4 | Hogwarts School of Witchcraft and Wizardry   |      450 | United Kingdom |
  92. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  93. |  6 | Koldovstoretz                                |      125 | Russia         |
  94. +----+----------------------------------------------+----------+----------------+
  95. 6 rows in set (0.00 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