Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind SQL CREATE DATABASE Statement?
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.
___ DATABASE3Order
Put the learning moves in the order that makes the concept easiest to apply.
Syntax for SQL Server
CREATE DATABASE Example
The SQL CREATE DATABASE Statement
The SQL CREATE DATABASE Statement
The CREATE DATABASE statement is used to create a new SQL database.
Tip
You need administrative privileges to create a new database.
Syntax
CREATE DATABASE
database_name
;CREATE DATABASE Example
The following SQL statement creates a database called "testDB":
Example
CREATE DATABASE testDB;Show Databases
Once a database is created, you can check it in the list of databases with the following SQL command:
Syntax for SQL Server
SELECT name FROM sys.databases;Syntax for MySQL
SHOW DATABASES;