All right.
So we saw how we can create databases and destroy them.
So what comes next.
We're going to see how we actually use them.
And I mean that in a very literal sense in my as well.
There is a use command and what this does is it tells me as well which database we want to be working
with.
So we have potentially 10 different databases on one my a school server and we want to search some data
from one of them.
What we need to tell my as well which one we want to be using at any given time and we can switch between
them using the use command that you see right here.
So really quickly show you how it works over in cloud 9.
So if we create a new database
then we'll just call this one dog walking app and we hit enter.
We do show databases.
There it is.
And if I want to use that all I have to do is type use dog walking app and you won't see much except
for database changed.
That's a good thing.
But if we wanted to know for sure what database we are currently using there there's another in my escarole
command that we can use that command looks like this select database with parentheses after it.
And what this will do is tell you the currently used database.
So let's try that out.
Back in cloud 9.
If I type select database with those parentheses and a semi-colon that tells me database is dog walking
app and if I decided to delete that database I would use the drop database dog walking app command.
It tells me queery OK I do show databases and it should be gone but if I do my select database command
pause and think to yourself for a moment what database do you think I'll be using right now.
We were using the dog walking app but then we deleted it.
So now what.
And here's the answer.
Kind of a trick question.
We're not using a database right now and the no here and we'll be talking a bit more about NO throughout
this course but that basically means we're not using any database.
So just to show you one more time if we switch.
Let's say I wanted to use one of these preexisting ones like the C-9 database.
I'm not going to do that.
But if I wanted to I just use C9.
And now if I do my select database
tells me database is se'nnight.
OK so that's all there is to using a database.
And then also this select database command to see your current database.
Next up we'll start talking about tables and putting some data in these databases as soon as possible.