Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   Misc

   Amazon

   Links

    


Create database syntax

 

CREATE DATABASE [IF NOT EXISTS] db_name
[create_specification [, create_specification] ...]

create_specification:
[DEFAULT] CHARACTER SET charset_name
| [DEFAULT] COLLATE collation_name

CREATE DATABASE creates a database with the given name.

Rules for allowable database names are given in section 10.2 Database, Table, Index, Column, and Alias Names. An error occurs if the database already exists and you didn't specify IF NOT EXISTS.

As of MySQL 4.1.1, create_specification options may be given. The CHARACTER SET clause specifies the database character set. The COLLATE clause specifies the database collation.

Database characteristics are stored in the `db.opt' file in the database directory.

Databases in MySQL are implemented as directories containing files that correspond to tables in the database. Because there are no tables in a database when it is initially created, the CREATE DATABASE statement only creates a directory under the MySQL data directory.

You can also create databases with mysqladmin.


 

 

back to MySQL reference


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
WeekDayName example(VB)
create a Microsoft Access database(VB)
Time based greeting(PHP)
draw a chord(VB)
Referring page(Javascript)
Browser info(ASP.net)
DAtabase example(ASP.net)
Size of a webpage with PHP and cURL(PHP)

    




Copyright © 2004 by programmershelp.co.uk