Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. mysql> insert into school (name, country, capacity)
  2. -> VALUES
  3. -> ('Ilvermorny School of Witchcraft and Wizardry', 'USA', '300'),
  4. -> ('Koldovstoretz', 'Russia', '125'),
  5. -> ('Mahoutokoro School of Magic ', 'Japan', '800'),
  6. -> ('Uagadou School of Magic ', 'Uganda', '350');
  7. Query OK, 4 rows affected (0.00 sec)
  8. Records: 4 Duplicates: 0 Warnings: 0
  9.  
  10.  
  11. mysql> UPDATE school SET country='Sweden' WHERE id='4';
  12. Query OK, 1 row affected (0.00 sec)
  13. Rows matched: 1 Changed: 1 Warnings: 0
  14.  
  15.  
  16. mysql> UPDATE school SET capacity=700 WHERE id='7';
  17. Query OK, 1 row affected (0.01 sec)
  18. Rows matched: 1 Changed: 1 Warnings: 0
  19.  
  20.  
  21. mysql> delete from school where name LIKE '%of Magic%';
  22. Query OK, 3 rows affected (0.00 sec)
  23.  
  24.  
  25. mysql> select * from school;
  26. +----+----------------------------------------------+----------+----------------+
  27. | id | name | capacity | country |
  28. +----+----------------------------------------------+----------+----------------+
  29. | 1 | Hogwarts School of Witchcraft and Wizardry | 450 | United Kingdom |
  30. | 3 | Castelobruxo | 380 | Brazil |
  31. | 4 | Durmstrang Institute | 570 | Sweden |
  32. | 5 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA |
  33. | 6 | Koldovstoretz | 125 | Russia |
  34. +----+----------------------------------------------+----------+----------------+
  35. 5 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement