Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\WS22>cd\
C:\>cd xampp\mysql\bin
C:\xampp\mysql\bin>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.41 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database klinik_Donie ;
Query OK, 1 row affected (0.00 sec)
mysql> use klinik_Donie ;
Database changed
mysql> create table pasien
-> (
-> id_pasien char (5) not null primary key,
-> nama varchar (50) not null,
-> umur char (2),
-> jenkel enum ('L','P'),
-> alamat varchar (35),
-> telp char (12)
-> );
( hasil keluaran tabel pasien )
mysql> create table dokter
-> (
-> kd_dokter char (5) not null primary key,
-> nama_dokter varchar (50) not null,
-> spesialis varchar (20),
-> telp_dokter char (12),
-> alamat_dokter varchar (35)
-> );
Query OK, 0 rows affected (0.02 sec)
mysql> create table diagnosa
-> (
-> id_pasien char (5) not null,
-> tgl_berobat date,
-> kd_dokter char (5) not null,
-> penyakit varchar (30),
-> obat varchar (30),
-> dosis varchar (30)
-> );
( hasil keluaran tabel dokter dan tabel diagnosa )
mysql> describe pasien ;
mysql> describe dokter ;
mysql> describe diagnosa ;
(hasil gambar keluaran)
Tidak ada komentar:
Posting Komentar