34,333
edits
Changes
→Creating a New MySQL Database
<pre>
CREATE DATABASE IF NOT EXISTS MySampleDB;
</pre>
== Creating Tables with SQL ==
New tables are added to an existing database using the SQL ''CREATE TABLE'' statement.
<pre>
CREATE TABLE customer
(
customer_id INT NOT NULL AUTO_INCREMENT,
customer_name char(20) NOT NULL,
customer_address char(20) NULL,
PRIMARY KEY (customer_id)
) ENGINE=InnoDB;
</pre>