Posted by: tonyteaching | February 21, 2009

to Create or Drop Database, Table

1. to create Database (e.g. names ‘latihan’)

create database latihan;

2. to delete/drop a Database (e.g. ‘latihan’)

drop database latihan;

3. to create Table

to create a Table, we need long code to define

– the Table name( );

– Field name TypeOfData (numberOfcharacter),

– PRIMARYKEY(fieldname)

for example: we want to make Table ‘survey1’

CREATE TABLE survey1 (id NOT NULL AUTO_INCREMENT,

sex VARCHAR(1),

age VARCHAR(1),

PRIMARY KEY (id));

4. To delete/drop a Table (e.g. ‘survey1”)

drop table survey1;


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: