Minggu, 18 Maret 2012

BELAJAR DASAR MYSQL

SINTAKS DDL

Melihat Database
SHOW DATABASES;

                                                            Gambar 2.1

Membuat Database
CREATE DATABASE latihan;

                                                                   Gambar 2.2

Memakai Database
USE latihan;

                                                                   Gambar 2.3

Menghapus Database
DROP DATABASE latihan;

                                                               Gambar 2.4

Membuat Table
CREATE TABLE data_siswa(
id INT(20) PRIMARY KEY AUTO_INCREMENT NOT NULL,
nama VARCHAR(20) NULL,
kelas VARCHAR(20) NULL,
telephone VARCHAR(20) NULL
);

◄ Newer Post Older Post ►