SHARE
TWEET

Untitled

a guest Oct 16th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mysql> 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', 450),
  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. Query OK, 8 rows affected (0.13 sec)
  11. Records: 8  Duplicates: 0  Warnings: 0
  12.  
  13.  
  14. mysql> UPDATE school
  15.     -> SET country='Sweden'
  16.     -> WHERE id=3;
  17. Query OK, 1 row affected (0.14 sec)
  18.  
  19.  
  20. mysql> UPDATE school
  21.     -> SET capacity=700
  22.     -> WHERE id=7;
  23. Query OK, 1 row affected (0.13 sec)
  24. Rows matched: 1  Changed: 1  Warnings: 0
  25.  
  26.  
  27. mysql> DELETE FROM school
  28.     -> WHERE name LIKE '%Magic%';
  29. Query OK, 3 row affected (0.13 sec)
  30.  
  31.  
  32. mysql> SELECT * FROM school;
  33. +----+----------------------------------------------+----------+----------------+
  34. | id | name                                         | capacity | country        |
  35. +----+----------------------------------------------+----------+----------------+
  36. |  2 | Castelobruxo                                 |      380 | Brazil         |
  37. |  3 | Durmstrang Institute                         |      570 | Sweden         |
  38. |  4 | Hogwarts School of Witchcraft and Wizardry   |      450 | United Kingdom |
  39. |  5 | Ilvermorny School of Witchcraft and Wizardry |      300 | USA            |
  40. |  6 | Koldovstoretz                                |      125 | Russia         |
  41. +----+----------------------------------------------+----------+----------------+
  42. 5 rows in set (0.00 sec)
  43.  
  44. 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