SHARE
TWEET

Untitled

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