Created
May 22, 2019 10:36
-
-
Save brendaMan/42f9866200f292a546169273a2c6675f to your computer and use it in GitHub Desktop.
03 - Data handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update school set country='Sweden' where id=3; | |
+----+----------------------------------------------+----------+----------------+ | |
| id | name | capacity | country | | |
+----+----------------------------------------------+----------+----------------+ | |
| 1 | Beauxbatons Academy of Magic | 550 | France | | |
| 2 | Casteloburgo | 380 | Brazil | | |
| 3 | Durmstrang Institute | 570 | Sweden | | |
| 4 | Hogwarts School of Witchcraft and Wizardry | 450 | United Kingdom | | |
| 5 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA | | |
| 6 | Koldovstoretz | 125 | Russia | | |
| 7 | Mahoutokoro School of Magic | 800 | Japan | | |
| 8 | Uagadou School of Magic | 350 | Uganda | | |
+----+----------------------------------------------+----------+----------------+ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delect from school where name like '%Magic%; | |
+----+----------------------------------------------+----------+----------------+ | |
| id | name | capacity | country | | |
+----+----------------------------------------------+----------+----------------+ | |
| 2 | Casteloburgo | 380 | Brazil | | |
| 3 | Durmstrang Institute | 570 | Sweden | | |
| 4 | Hogwarts School of Witchcraft and Wizardry | 450 | United Kingdom | | |
| 5 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA | | |
| 6 | Koldovstoretz | 125 | Russia | | |
+----+----------------------------------------------+----------+---------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from school; | |
+----+----------------------------------------------+----------+----------------+ | |
| id | name | capacity | country | | |
+----+----------------------------------------------+----------+----------------+ | |
| 2 | Casteloburgo | 380 | Brazil | | |
| 3 | Durmstrang Institute | 570 | Sweden | | |
| 4 | Hogwarts School of Witchcraft and Wizardry | 450 | United Kingdom | | |
| 5 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA | | |
| 6 | Koldovstoretz | 125 | Russia | | |
+----+----------------------------------------------+----------+---------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update school set capacity=700 where id=7; | |
+----+----------------------------------------------+----------+----------------+ | |
| id | name | capacity | country | | |
+----+----------------------------------------------+----------+----------------+ | |
| 1 | Beauxbatons Academy of Magic | 550 | France | | |
| 2 | Casteloburgo | 380 | Brazil | | |
| 3 | Durmstrang Institute | 570 | Sweden | | |
| 4 | Hogwarts School of Witchcraft and Wizardry | 450 | United Kingdom | | |
| 5 | Ilvermorny School of Witchcraft and Wizardry | 300 | USA | | |
| 6 | Koldovstoretz | 125 | Russia | | |
| 7 | Mahoutokoro School of Magic | 700 | Japan | | |
| 8 | Uagadou School of Magic | 350 | Uganda | | |
+----+----------------------------------------------+----------+----------------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment