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