bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL DATABASE Keyword

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind SQL DATABASE Keyword?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ DATABASE testDB;
3Order

Put the learning moves in the order that makes the concept easiest to apply.

The DROP DATABASE command is used is to delete an existing SQL database.
The following SQL creates a database called "testDB":
The CREATE DATABASE command is used is to create a new SQL database.

Create Database

The CREATE DATABASE command is used is to create a new SQL database.

The following SQL creates a database called "testDB":

Example

CREATE DATABASE testDB;

Tip

Make sure you have admin privilege before creating any database. Once a database is created, you can check it in the list of databases with the following SQL command: SHOW DATABASES;

Drop Database

The DROP DATABASE command is used is to delete an existing SQL database.

The following SQL drops a database named "testDB":

Example

DROP DATABASE testDB;

Note

Be careful before dropping a database. Deleting a database will result in loss of complete information stored in the database!

Previous

SQL CREATE VIEW Keyword

Next

SQL DEFAULT Keyword