Creating databases
suggest changeSyntax
- CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name [create_specification] /// To create database
- DROP {DATABASE | SCHEMA} [IF EXISTS] db_name /// To drop database
Parameters
| Parameter | Details |
|---|---|
CREATE DATABASE |
Creates a database with the given name |
CREATE SCHEMA |
A synonym for CREATE DATABASE. In MySQL this is the database itself, not a namespace inside it |
IF NOT EXISTS |
Avoids an error if that database already exists |
create_specification |
Database characteristics such as CHARACTER SET and COLLATE |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents