Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INSERT INTO schools (name, country, capacity) VALUES
- ('Beauxbatons Academy of Magic', 'France', 550),
- ('Castelobruxo', 'Brazil', 380),
- ('Durmstrang Institute', 'Sweden', 570),
- ('Ilvermorny School of Witchcraft and Wizardry', 'USA', 300),
- ('Koldovstoretz', 'Russia', 125),
- ('Mahoutokoro School of Magic','Japan', 800),
- ('Uagadou School of Magic', 'Uganda', 350);
- mysql> SELECT * FROM schools;
- +----+----------------------------------------------+----------+----------------+
- | id | name | capacity | country |
- +----+----------------------------------------------+----------+----------------+
- | 5 | Hogwarts School of Witchcraft and Wizardry | 450 | United Kingdom |
- | 6 | Beauxbatons Academy of Magic | 550 | France |
- | 7 | Castelobruxo | 380 | Brazil |
- | 8 | Durmstrang Institute | 570 | Norway |
- | 9 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA |
- | 10 | Koldovstoretz | 125 | Russia |
- | 11 | Mahoutokoro School of Magic | 800 | Japan |
- | 12 | Uagadou School of Magic | 350 | Uganda |
- +----+----------------------------------------------+----------+----------------+
- 8 rows in set (0,05 sec)
- mysql> DELETE FROM schools WHERE name LIKE '%Magic';
- Query OK, 3 rows affected (0,03 sec)
- UPDATE schools SET country='Sweden' WHERE country='Norway';
- Query OK, 1 row affected (0,38 sec)
- Rows matched: 1 Changed: 1 Warnings: 0
- mysql> UPDATE schools SET capacity= 700 WHERE country='Japan';
- Query OK, 1 row affected (0,40 sec)
- Rows matched: 1 Changed: 1 Warnings: 0
- mysql> SELECT * FROM schools;
- +----+----------------------------------------------+----------+----------------+
- | id | name | capacity | country |
- +----+----------------------------------------------+----------+----------------+
- | 5 | Hogwarts School of Witchcraft and Wizardry | 450 | United Kingdom |
- | 7 | Castelobruxo | 380 | Brazil |
- | 9 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA |
- | 10 | Koldovstoretz | 125 | Russia |
- | 13 | Mahoutokoro School of Magic | 700 | Japan |
- | 14 | Durmstrang Institute | 570 | Sweden |
- +----+----------------------------------------------+----------+----------------+
- 6 rows in set (0,00 sec)
- mysql> DELETE FROM schools WHERE name LIKE '%Magic';
- Query OK, 1 row affected (0,06 sec)
- mysql> SELECT * FROM schools;
- +----+----------------------------------------------+----------+----------------+
- | id | name | capacity | country |
- +----+----------------------------------------------+----------+----------------+
- | 5 | Hogwarts School of Witchcraft and Wizardry | 450 | United Kingdom |
- | 7 | Castelobruxo | 380 | Brazil |
- | 9 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA |
- | 10 | Koldovstoretz | 125 | Russia |
- | 14 | Durmstrang Institute | 570 | Sweden |
- +----+----------------------------------------------+----------+----------------+
- 5 rows in set (0,00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement