Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\G Eight>cd ..
C:\Users>cd ..
C:\>cd xampp
C:\xampp>cd mysql
C:\xampp\mysql>cd bin
C:\xampp\mysql\bin>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 5.5.34 MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserve
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statem
mysql> create database ujian_onlain;
Query OK, 1 row affected (0.00 sec)
mysql> use ujian_onlain;
Database changed
mysql> create table bagian (
-> kd_bagian char(3) not null,
-> nm_bagian varchar9100) not null,
-> kd_pelajaran char(3) not null,
-> primary key (kd_bagian)
-> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
corresponds to your MySQL server version for the right syntax to use near
ar9100) not null,
kd_pelajaran char(3) not null,
primary key (kd_bagian)
)' at line 3
mysql> use ujian_onlain;
Database changed
mysql> create table bagian (
-> kd_bagian char(3) not null,
-> nm_bagian varchar(100) not null,
-> kd_pelajaran char(3) not null,
-> primary key (kd_bagian)
-> );
Query OK, 0 rows affected (0.61 sec)
mysql> create table kelas (
-> kd_kelas char(3) not null,
-> nm_kelas varchar(100) not null,
-> primary key (kd_kelas));
Query OK, 0 rows affected (0.15 sec)
mysql> create table petugas (
-> kd_petugas char(4) not null,
-> nm_petugas varchar(100) not null,
-> no_telepon varchar(20) not null,
-> username varchar(20) not null,
-> password varchar(200) not null,
-> level varchar(20) not null,
-> primary key (kd_petugas)
-> );
Query OK, 0 rows affected (0.07 sec)
mysql> create table siswa (
-> kd_siswa char(5) not null,
-> nm_siswa varchar(100) not null,
-> kelamin varchar(30) not null,
-> agama varchar(30) not null,
-> alamat varchar(200) not null,
-> email varchar(100) not null,
-> no_telepon varchar(40) not null,
-> lahir_tempat varchar(100) not null,
-> lahir_tanggal date not null,
-> foto varchar(200) not null,
-> kd_kelas char(3) not null,
-> login_user varchar(30),
-> login_pass varchar(100) not null,
-> primary key (kd_siswa)
-> );
Query OK, 0 rows affected (0.10 sec)
mysql> create table pelajaran (
-> kd_pelajaran char(3) not null,
-> nm_pelajaran varchar(100),
-> primary key (kd_pelajaran)
-> );
Query OK, 0 rows affected (0.15 sec)
mysql> create table soal (
-> kd_soal char(5) not null,
-> pertanyaan text not null,
-> pilihan_a varchar(200) not null,
-> pilihan_b varchar(200) not null,
-> pilihan_c varchar(200) not null,
-> pilihan_d varchar(200) not null,
-> pilihan_e varchar(200) not null,
-> kunci enum('a','b','c','d','e'),
-> soal_gambar varchar(100) not null,
-> kd_pelajaran char(3) not null,
-> kd_bagian char(3) not null,
-> primary key (kd_soal)
-> );
Query OK, 0 rows affected (0.13 sec)
mysql> create table ujian (
-> kd_ujian char(5) not null,
-> nm_ujian varchar(100) not null,
-> tgl_ujian date not null,
-> status_ujian enum('ujian','selesai','batal'),
-> kd_pelajaran char(3) not null,
-> kd_petugas char(4) not null,
-> primary key(kd_ujian)
-> );
Query OK, 0 rows affected (0.11 sec)
mysql> create table ujian_soal (
-> id int(11) not null,
-> no_peserta char(6) not null,
-> kd_soal char(5) not null,
-> jawaban enum('a','b','c','d','e'),
-> primary key (id)
-> );
Query OK, 0 rows affected (0.15 sec)
mysql> create table ujian_jawaban (
-> id integer(11) not null,
-> no_peserta char(6) not null,
-> kd_soal char(5) not null,
-> jawaban enum (",'a',b','c','d','e'),
"> primary key (id)
"> );
"> \;
"> fhsjkdghjsa'
"> ;'afa
">
"> '"
-> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
corresponds to your MySQL server version for the right syntax to use near
line 6
mysql> create table ujian_jawaban (
-> id int(11) not null,
-> no_peserta char(6) not null,
-> kd_soal char(5) not null,
-> jawaban enum('a','b','c','d','e'),
-> primary key (id)
-> );
Query OK, 0 rows affected (0.11 sec)
mysql> desc bagian;
+--------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| kd_bagian | char(3) | NO | PRI | NULL | |
| nm_bagian | varchar(100) | NO | | NULL | |
| kd_pelajaran | char(3) | NO | | NULL | |
+--------------+--------------+------+-----+---------+-------+
3 rows in set (0.02 sec)
mysql> show database;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
corresponds to your MySQL server version for the right syntax to use near
ase' at line 1
mysql> show databases;
+---------------------+
| Database |
+---------------------+
| information_schema |
| cdcol |
| datalogin2 |
| mysql |
| performance_schema |
| phpmyadmin |
| sistem_ujian_onleni |
| sistem_ujian_online |
| test |
| ujian_onlain |
| webauth |
+---------------------+
11 rows in set (0.00 sec)
mysql>
0 komentar:
Posting Komentar
Kritik dan saran sangat kami harapkan untuk meningkatkan Layanan kami