Skip to content

Instantly share code, notes, and snippets.

@angelique-w
Created November 19, 2019 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelique-w/04cbf640a1a5d3439ff21939e722982d to your computer and use it in GitHub Desktop.
Save angelique-w/04cbf640a1a5d3439ff21939e722982d to your computer and use it in GitHub Desktop.
mysql> INSERT INTO school (name, country, capacity) VALUES ('Beauxbatons Academy of Magic', 'France', 550), ('Castelobruxo', 'Brazil', 380), ('Durmstrang Institute', 'Norway', 570), ('Koldovstoretz', 'Russia', 125), ('Mahoutokoro School of Magic', 'Japan', 800), ('Uagadou School of Magic', 'Uganda', 350);
mysql> UPDATE school SET country='Sweden' WHERE id=3;
mysql> UPDATE school SET capacity=700 WHERE id=5;
mysql> DELETE FROM school WHERE name LIKE '%Magic%';
mysql> SELECT * FROM school;
+----+----------------------+----------+---------+
| id | name | capacity | country |
+----+----------------------+----------+---------+
| 2 | Castelobruxo | 380 | Brazil |
| 3 | Durmstrang Institute | 570 | Sweden |
| 4 | Koldovstoretz | 125 | Russia |
+----+----------------------+----------+---------+
3 rows in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment