Skip to content

Instantly share code, notes, and snippets.

@mehdihettak
Created May 14, 2019 10:42
Show Gist options
  • Select an option

  • Save mehdihettak/83b7392456c5e61491da6cf39d04850b to your computer and use it in GitHub Desktop.

Select an option

Save mehdihettak/83b7392456c5e61491da6cf39d04850b to your computer and use it in GitHub Desktop.
mysql> INSERT INTO school (name, country, capacity) VALUES ('Ilvermorny School of Witchcraft and Wizardry', 'USA', 300), ('Koldovstoretz', 'Russia', 125), ('Mahoutokoro School of Magic', 'Japan', 800), ('Uagadou School of Magic','Uganda',350);
mysql> UPDATE school SET country='Sweden' WHERE id=4;
mysql> UPDATE school SET capacity=700 WHERE id=7;
mysql> DELETE FROM school WHERE name LIKE '%Magic%';
+----+----------------------------------------------+----------+----------------+
| id | name | capacity | country |
+----+----------------------------------------------+----------+----------------+
| 1 | Hogwarts School of Witchcraft and Wizardry | 400 | United Kingdom |
| 3 | Castelobruxo | 380 | Brazil |
| 4 | Durmstrang Institute | 570 | Sweden |
| 5 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA |
| 6 | Koldovstoretz | 125 | Russia |
+----+----------------------------------------------+----------+----------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment