1 00:00:00,120 --> 00:00:05,460 So we've seen how to create a database and the natural next step is to see how to delete one. 2 00:00:06,360 --> 00:00:07,410 It's pretty simple. 3 00:00:07,860 --> 00:00:13,710 The command is drop database and then whatever the name of the database is that you're looking to delete. 4 00:00:13,890 --> 00:00:18,610 So we'll come across this term, drop here a couple of times in the course. 5 00:00:18,630 --> 00:00:24,600 It's basically the SQL version of Delete, and we'll be able to use it to drop things other than just 6 00:00:24,600 --> 00:00:25,350 a database. 7 00:00:25,350 --> 00:00:28,680 We'll be able to delete tables, for instance, once we get there. 8 00:00:29,070 --> 00:00:30,330 So let's try it out. 9 00:00:31,340 --> 00:00:34,790 Back in cloud nine when I ran shadow databases. 10 00:00:34,790 --> 00:00:36,440 Here are two that I created. 11 00:00:37,130 --> 00:00:40,680 I'm not going to delete any of the pre-existing ones. 12 00:00:40,700 --> 00:00:42,200 I just don't want to mess with that. 13 00:00:42,200 --> 00:00:44,430 So we will delete both of these though. 14 00:00:44,450 --> 00:00:46,910 Hello, world db and testing DB. 15 00:00:47,090 --> 00:00:48,560 So let's do that now. 16 00:00:48,590 --> 00:00:52,610 Drop Database helloworld db. 17 00:00:53,900 --> 00:00:54,830 Semicolon. 18 00:00:56,720 --> 00:01:00,200 And you can tell that it works first of all because it said query OC. 19 00:01:00,530 --> 00:01:04,370 But then also if I recall, show databases. 20 00:01:05,160 --> 00:01:06,090 This time. 21 00:01:06,090 --> 00:01:08,010 Hello, world Deb is gone. 22 00:01:09,150 --> 00:01:10,440 Let's do the same thing. 23 00:01:10,440 --> 00:01:13,740 Drop database for testing DB. 24 00:01:13,770 --> 00:01:16,500 This time I'm going to leave off a semicolon. 25 00:01:16,500 --> 00:01:23,100 Not because it's a good idea, but just to remind you that your code will not execute until you add 26 00:01:23,100 --> 00:01:23,730 that in there. 27 00:01:24,660 --> 00:01:26,610 It doesn't matter that it's on a separate line. 28 00:01:26,610 --> 00:01:29,880 We'll be writing multi line queries just a little bit. 29 00:01:29,880 --> 00:01:32,190 What does matter is that it's there at all. 30 00:01:32,190 --> 00:01:35,310 It's what indicates that you're done and that it should run. 31 00:01:35,820 --> 00:01:36,450 So. 32 00:01:37,750 --> 00:01:39,550 We can just double check that it worked. 33 00:01:39,580 --> 00:01:44,970 Now our testing DB has gone as well, so that's all there is to dropping a database. 34 00:01:44,980 --> 00:01:46,330 Pretty straightforward command.