0% found this document useful (0 votes)
65 views1 page

SQL Database Creation Guide

The SQL CREATE DATABASE statement is used to create new databases. The basic syntax is CREATE DATABASE DatabaseName; where the database name must be unique. For example, to create a database called testDB, use CREATE DATABASE testDB. Administrative privileges are required and the new database can then be viewed in the list of databases using SHOW DATABASES.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views1 page

SQL Database Creation Guide

The SQL CREATE DATABASE statement is used to create new databases. The basic syntax is CREATE DATABASE DatabaseName; where the database name must be unique. For example, to create a database called testDB, use CREATE DATABASE testDB. Administrative privileges are required and the new database can then be viewed in the list of databases using SHOW DATABASES.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SQL - CREATE DATABASE

[Link] rialspo [Link] m/sql/sql-cre ate -database .htm


Co pyrig ht tuto rials po [Link] m

T he SQL CREAT E DAT ABASE statement is used to create new SQL database.

Syntax:
Basic syntax of CREAT E DAT ABASE statement is as follows:
CREATE DATABASE DatabaseName;

Always database name should be unique within the RDBMS.

Example:
If you want to create new database <testDB>, then CREAT E DAT ABASE statement would be as follows:
SQL> CREATE DATABASE testDB;

Make sure you have admin privileg e before creating any database. Once a database is created, you can check it in the list of databases as follows:
SQL> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | AMROOD | | TUTORIALSPOINT | | mysql | | orig | | test | | testDB | +--------------------+ 7 rows in set (0.00 sec)

You might also like