Hey guys. So in our last lesson, we looked at how you go about creating a database using database scripts or our SQL commands rather. And in this video, we will be looking at how we go about dropping or removing a database. So in the previous video, we would have looked at two ways to create databases using our command line interface, and our did SQL script. And so we ended up with two versions of school underscore dB, or school under the score DB and DB one. So in this video, we want to remove one of them.
So we look at the command used to remove our drop a database that we no longer want. So I'm just going to go ahead and create a new script file. I don't over this and to do that, once again, you just click that SQL file over to the left with the plus sign and that gives us a fresh script file which is capable of taking first scripts and we can see this as another file. So that is one of the key advantages to using workbench when we want to execute many queries. So with a new file, we can actually go ahead and start writing out our keywords. So I'm going to write in lower caps this time, once again SQL is not case sensitive.
So I can say drop database. So those are the key words drop meaning remove. And please note there is no undo with this step there is no Recycle Bin and recovered from doing this command is rather tedious. So I advise you please be very deliberate when you're about to execute this command drop database and then the database name. And as I start typing, you see that my SQL is suggesting the databases that I may be interested in so I want school DB one, so I can just select it, press enter and it will auto fill and you just end it With a semi colon, before I execute this, I'm going to say once again, be very, very, very, very deliberate when executing this, there is no Undo, it won't prompt you and ask you, if you're sure. Alright, so I type this and then I click Execute, and then you see that you will see that it was executed.
And if I refresh over in my schemas, then there is no school DB One, two, to be used again. All right. So once again, be very deliberate before you run this command. All right, and if I try to execute it again, then we get to our first arrow, and he will see can drop a database because it does not exist. All right. So of course, if you get that arrow and you're looking at the database, and you probably have a spilling arrow on either side, you can just double check that But once again, that is how you remove a database using an SU Come on.
So I can just add a comment and I'm going to use my multi line comments in this one and say this is how you remove it is be very permissive, very deliberate. Alright, so I'm going to include this sample script file. And I'll just save it quickly and call it drop school DB one. Alright, and that is going to be included with the resources for this video and this lesson.