Changes

Jump to: navigation, search

Creating Databases and Tables Using SQL Commands

314 bytes added, 16:04, 28 September 2007
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>

Navigation menu