Create a database in the mysql tutorial and delete a database instance
Create database <database>;
Mysql>
Mysql>
Mysql> create database myDatabase;
Query OK, 1 row affected (0.03 sec)
Mysql>
Mysql> drop database myDatabase;
Query OK, 0 rows affected (0.01 sec)
Mysql>
Under Unix, database and table names are case sensitive.
Under Windows, this restriction does not apply
Mysql>
Use to change the current table
Mysql>
Mysql>
Mysql> create database myDatabase;
Query OK, 1 row affected (0.02 sec)
Mysql> USE myDatabase; -- Select it manually
Database changed
Mysql> drop database myDatabase;
Query OK, 0 rows affected (0.00 sec)
Mysql>
Mysql>
Example of condensation above
Mysql>
Mysql> create database myDatabase default character set latin2 COLLATE latin2_czech_ci;
Query OK, 1 row affected (0.02 sec)
Mysql>
Mysql>
Mysql>
Mysql> USE myDatabase;
Database changed
Mysql>
Mysql> create table myTable
-> (
-> C1 CHAR (10)
-> );
Query OK, 0 rows affected (0.03 sec)
Mysql>
Mysql> drop table myTable;
Query OK, 0 rows affected (0.00 sec)
Mysql>
Mysql> drop database myDatabase;
Query OK, 0 rows affected (0.00 sec)
Mysql>
Mysql> use test;
Database changed