WEBVTT

00:00.160 --> 00:05.800
So we have seen how to create a database and the natural next step is to see how to delete one.

00:06.420 --> 00:07.860
It's pretty simple.

00:07.860 --> 00:13.180
The command is drop database and then whatever the name of the database is that you're looking to do

00:13.180 --> 00:13.970
it.

00:14.040 --> 00:18.810
So we'll come across this term drop here a couple of times in the course.

00:18.840 --> 00:21.020
It's basically the sequel version of delete.

00:21.150 --> 00:27.780
And we'll be able to use it to drop things other than just a database be able to delete tables for instance.

00:27.780 --> 00:29.110
Once we get there.

00:29.190 --> 00:30.830
So let's try it up.

00:31.350 --> 00:36.780
Back in cloud 9 when I ran share databases here are two that I created.

00:37.260 --> 00:40.560
I'm not going to delete any of the preexisting ones.

00:40.710 --> 00:42.310
I just don't want to mess with that.

00:42.330 --> 00:44.410
So we will delete both of these though.

00:44.430 --> 00:47.280
Hello world DP and testing D-B.

00:47.280 --> 00:48.440
So let's do that now.

00:48.610 --> 00:50.760
Drop database.

00:51.240 --> 00:56.530
Hello world TV semi-coma.

00:56.830 --> 00:58.110
And you can tell that it works.

00:58.120 --> 01:06.690
First of all because it said queery OK but then also if I recall show database's this time hello world

01:06.690 --> 01:08.430
D-B is gone.

01:09.180 --> 01:10.330
Let's do the same thing.

01:10.500 --> 01:13.860
Drop database for testing TV.

01:13.920 --> 01:20.070
This time I'm going to leave off a semi-colon not because it's a good idea but just to remind you that

01:20.400 --> 01:24.600
your code will not execute until you had that in there.

01:24.690 --> 01:26.820
Doesn't matter that it's on a separate line.

01:26.820 --> 01:29.870
We'll be writing multi line queries just a little bit.

01:30.090 --> 01:32.160
What does matter is that it's there at all.

01:32.280 --> 01:35.600
It's what indicates that you're done and that it should run.

01:35.970 --> 01:39.760
So we can just double check that it worked.

01:39.780 --> 01:42.230
Now our testing DB is gone as well.

01:42.540 --> 01:44.930
So that's all there is to dropping a database.

01:45.060 --> 01:46.250
Pretty straightforward comment.
