MorkaLork Development

Interesting stuff I've picked up over the years...

Mysql 1: CREATE

2009-04-16 18:06:01 | 318 views | sql create database table command

Create database:


The first command you want to try is the CREATE command in order to create a database.

Syntax:

CREATE DATABASE xxx;

Example:

CREATE DATABASE person;



Create table:


After you created a database, you'll want to add a table:

Syntax:

CREATE TABLE 'xxx' (
col1 datatype option,
);


Example:

CREATE TABLE `Person` (

`Name` VARCHAR( 150 ) NOT NULL ,
`Age` INT( 3 ) NOT NULL ,
`Gender` VARCHAR( 25 ) NOT NULL
);



Article comments

Feel free to comment this article using a facebook profile.

I'm using facebook accounts for identification since even akismet couldn't handle all the spam I receive every day.