SHARE
TWEET

Untitled

a guest Oct 18th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. INSERT INTO school (name, country, capacity)
  2.     -> VALUES ('Beauxbatons Academy of Magic'    , 'France', 550 );
  3.     ->('Castelobruxo' , 'Brazil', 380),
  4.     -> ('Durmstrang Institute' , 'Norway' , 570  ),
  5.     -> ('Hogwarts School of Witchcraft and Wizardry' , 'United Kingdom'  , 45 ),
  6.     -> ('Ilvermorny School of Witchcraft and Wizardry' , 'USA' , 300),
  7.     -> ('Koldovstoretz'  , 'Russia', 125    ),
  8.     -> ('Mahoutokoro School of Magic' , 'Japan', 800 ),
  9.     -> ('Uagadou School of Magic'  , 'Uganda'     , 350  );
  10.  
  11.  
  12. +----+----------------------------------------------+----------+----------------+
  13. | id | name                                         | capacity | country        |
  14. +----+----------------------------------------------+----------+----------------+
  15. |  1 | Beauxbatons Academy of Magic                 |      550 | France         |
  16. |  2 | Castelobruxo                                 |      380 | Brazil         |
  17. |  3 | Durmstrang Institute                         |      570 | Norway         |
  18. |  4 | Hogwarts School of Witchcraft and Wizardry   |       45 | United Kingdom |
  19. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  20. |  6 | Koldovstoretz                                |      125 | Russia         |
  21. |  7 | Mahoutokoro School of Magic                  |      800 | Japan          |
  22. |  8 | Uagadou School of Magic                      |      350 | Uganda         |
  23. +----+----------------------------------------------+----------+----------------+
  24. 8 rows in set (0.00 sec)
  25.  
  26.  
  27. UPDATE school SET country='Sweden' WHERE name LIKE 'Durmstrang Institute';
  28. +----+----------------------------------------------+----------+----------------+
  29. | id | name                                         | capacity | country        |
  30. +----+----------------------------------------------+----------+----------------+
  31. |  1 | Beauxbatons Academy of Magic                 |      550 | France         |
  32. |  2 | Castelobruxo                                 |      380 | Brazil         |
  33. |  3 | Durmstrang Institute                         |      570 | Sweden         |
  34. |  4 | Hogwarts School of Witchcraft and Wizardry   |       45 | United Kingdom |
  35. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  36. |  6 | Koldovstoretz                                |      125 | Russia         |
  37. |  7 | Mahoutokoro School of Magic                  |      800 | Japan          |
  38. |  8 | Uagadou School of Magic                      |      350 | Uganda         |
  39. +----+----------------------------------------------+----------+----------------+
  40. 8 rows in set (0.00 sec)
  41.  
  42.  
  43. UPDATE school SET capacity='700' WHERE name LIKE 'Mahoutokoro School of Magic';
  44. +----+----------------------------------------------+----------+----------------+
  45. | id | name                                         | capacity | country        |
  46. +----+----------------------------------------------+----------+----------------+
  47. |  1 | Beauxbatons Academy of Magic                 |      550 | France         |
  48. |  2 | Castelobruxo                                 |      380 | Brazil         |
  49. |  3 | Durmstrang Institute                         |      570 | Sweden         |
  50. |  4 | Hogwarts School of Witchcraft and Wizardry   |       45 | United Kingdom |
  51. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  52. |  6 | Koldovstoretz                                |      125 | Russia         |
  53. |  7 | Mahoutokoro School of Magic                  |      700 | Japan          |
  54. |  8 | Uagadou School of Magic                      |      350 | Uganda         |
  55. +----+----------------------------------------------+----------+----------------+
  56. 8 rows in set (0.00 sec)
  57.  
  58. DELETE FROM school WHERE name LIKE '%Magic%';
  59.  
  60. mysql> SELECT * FROM school;
  61. +----+----------------------------------------------+----------+----------------+
  62. | id | name                                         | capacity | country        |
  63. +----+----------------------------------------------+----------+----------------+
  64. |  2 | Castelobruxo                                 |      380 | Brazil         |
  65. |  3 | Durmstrang Institute                         |      570 | Sweden         |
  66. |  4 | Hogwarts School of Witchcraft and Wizardry   |       45 | United Kingdom |
  67. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  68. |  6 | Koldovstoretz                                |      125 | Russia         |
  69. +----+----------------------------------------------+----------+----------------+
  70. 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