soalttspemrogbd.txt

Download SoalTTSPemrogBD.txt

If you can't read please download the document

Upload: yusup

Post on 18-Feb-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

mysql> create database dbTTS1314;Query OK, 1 row affected (0.08 sec)mysql> use dbtts1314Database changedmysql> create table tblMhs (NIM Char(9) Not Null primary Key, -> NamaMhs Varchar(30), -> TglLahir Date Not Null Default '1995-01-01', -> JenisKel Enum('Pria','Wanita') Not Null, -> Alamat Varchar(30));Query OK, 0 rows affected (0.16 sec)mysql> desc tblMmhs;ERROR 1146 (42S02): Table 'dbtts1314.tblmmhs' doesn't existmysql> desc tblMhs;+----------+-----------------------+------+-----+------------+-------+| Field | Type | Null | Key | Default | Extra |+----------+-----------------------+------+-----+------------+-------+| NIM | char(9) | NO | PRI | | | | NamaMhs | varchar(30) | YES | | NULL | | | TglLahir | date | NO | | 1995-01-01 | | | JenisKel | enum('Pria','Wanita') | NO | | | | | Alamat | varchar(30) | YES | | NULL | | +----------+-----------------------+------+-----+------------+-------+5 rows in set (0.02 sec)mysql> create table tblMK ( -> KodeMK Char(5) Not Null Primary Key, -> NamaMK Varchar(50), -> SKS TinyInt(1) Not Null Default 2, -> Smt TinyInt(1) Not Null Default 1);Query OK, 0 rows affected (0.06 sec)mysql> desc tblMk;+--------+-------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+--------+-------------+------+-----+---------+-------+| KodeMK | char(5) | NO | PRI | | | | NamaMK | varchar(50) | YES | | NULL | | | SKS | tinyint(1) | NO | | 2 | | | Smt | tinyint(1) | NO | | 1 | | +--------+-------------+------+-----+---------+-------+4 rows in set (0.02 sec)mysql> create tblNilai (NIM Char(9) Not Null, -> KodeMK Char(5) Not Null, -> TTS TinyInt(3) Unsigned Not Null Default 0, -> TAS TinyInt(3) Unsigned Not Null Default 0, -> Tugas TinyInt(3) Unsigned Not Null Default 0, -> NilAngka Decimal(6,2), -> NilHuruf Char(1), -> Primary Key(NIM,KodeMK));ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tblNilai (NIM Char(9) Not Null,KodeMK Char(5) Not Null,TTS TinyInt(3) Unsigned' at line 1mysql> create Table tblNilai (NIM Char(9) Not Null, -> KodeMK Char(5) Not Null, -> TTS TinyInt(3) Unsigned Not Null Default 0, -> TAS TinyInt(3) Unsigned Not Null Default 0, -> Tugas TinyInt(3) Unsigned Not Null Default 0, -> NilAngka Decimal(6,2), -> NilHuruf Char(1), -> Primary Key(NIM,KodeMK));Query OK, 0 rows affected (0.05 sec)mysql> desc tblNilai;+----------+---------------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+----------+---------------------+------+-----+---------+-------+| NIM | char(9) | NO | PRI | | | | KodeMK | char(5) | NO | PRI | | | | TTS | tinyint(3) unsigned | NO | | 0 | | | TAS | tinyint(3) unsigned | NO | | 0 | | | Tugas | tinyint(3) unsigned | NO | | 0 | | | NilAngka | decimal(6,2) | YES | | NULL | | | NilHuruf | char(1) | YES | | NULL | | +----------+---------------------+------+-----+---------+-------+7 rows in set (0.02 sec)mysql> insert into tblMhs values -> ('223120001','Budi Susanto','1995-10-23','Pria','Jln. Jend. Sudirman No.1 2 Semarang');Query OK, 1 row affected, 1 warning (0.16 sec)mysql> select * from tblMhs;+-----------+--------------+------------+----------+--------------------------------+| NIM | NamaMhs | TglLahir | JenisKel | Alamat |+-----------+--------------+------------+----------+--------------------------------+| 223120001 | Budi Susanto | 1995-10-23 | Pria | Jln. Jend. Sudirman No.1 2 Sem | +-----------+--------------+------------+----------+--------------------------------+1 row in set (0.03 sec)mysql> select * from tblMhs;+-----------+--------------+------------+----------+--------------------------------+| NIM | NamaMhs | TglLahir | JenisKel | Alamat |+-----------+--------------+------------+----------+--------------------------------+| 223120001 | Budi Susanto | 1995-10-23 | Pria | Jln. Jend. Sudirman No.1 2 Sem | +-----------+--------------+------------+----------+--------------------------------+1 row in set (0.00 sec)mysql> alter table tblMhs modify Alamat Varchar(50);Query OK, 1 row affected (0.14 sec)Records: 1 Duplicates: 0 Warnings: 0mysql> update tblmhs set Alamat = 'Jl. Jend. Sudirman No. 12 Smg' where nim like '223120001';Query OK, 1 row affected (0.06 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> select * from tblMhs;+-----------+--------------+------------+----------+-------------------------------+| NIM | NamaMhs | TglLahir | JenisKel | Alamat |+-----------+--------------+------------+----------+-------------------------------+| 223120001 | Budi Susanto | 1995-10-23 | Pria | Jl. Jend. Sudirman No. 12 Smg | +-----------+--------------+------------+----------+-------------------------------+1 row in set (0.00 sec)mysql> insert into tblMhs values -> ('223120002','Indahwati','1995-04-13','Wanita','Jln. Pemuda No. 8 Ungaran'), -> ('223120003','Yuliana','1996-08-06','Wanita','Gang Mangga No. 34 Kendal'), -> ('223120004','Eko Wahyudi','1994-04-28','Pria','Jln. Ahmad Yani No. 14 Semarang'), -> ('223120005','Bambang W','1996-11-09','Pria','Jln. Hanoman No. 27 Salatiga');Query OK, 4 rows affected (0.00 sec)Records: 4 Duplicates: 0 Warnings: 0mysql> select * from tblMhs;+-----------+--------------+------------+----------+---------------------------------+| NIM | NamaMhs | TglLahir | JenisKel | Alamat |+-----------+--------------+------------+----------+---------------------------------+| 223120001 | Budi Susanto | 1995-10-23 | Pria | Jl. Jend. Sudirman No. 12 Smg | | 223120002 | Indahwati | 1995-04-13 | Wanita | Jln. Pemuda No. 8 Ungaran | | 223120003 | Yuliana | 1996-08-06 | Wanita | Gang Mangga No. 34 Kendal | | 223120004 | Eko Wahyudi | 1994-04-28 | Pria | Jln. Ahmad Yani No. 14 Semarang | | 223120005 | Bambang W | 1996-11-09 | Pria | Jln. Hanoman No. 27 Salatiga | +-----------+--------------+------------+----------+---------------------------------+5 rows in set (0.00 sec)mysql> desc tblMK;+--------+-------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+--------+-------------+------+-----+---------+-------+| KodeMK | char(5) | NO | PRI | | | | NamaMK | varchar(50) | YES | | NULL | | | SKS | tinyint(1) | NO | | 2 | | | Smt | tinyint(1) | NO | | 1 | | +--------+-------------+------+-----+---------+-------+4 rows in set (0.00 sec)mysql> insert into tblMK values -> ('MK-01','Sistem Basis Data',3,1);Query OK, 1 row affected (0.00 sec)mysql> insert into tblMK values -> ('MK-02','Pemrgraman Basis Data',2,3), -> ('MK-03','Pengantat Teknologi Informasi',3,2), -> ('MK-04','Logika Informantika',2,1), -> ('MK-04','Bahasa Inggris Informatika',3,1);ERROR 1062 (23000): Duplicate entry 'MK-04' for key 1mysql> select * from tblMK;+--------+-------------------------------+-----+-----+| KodeMK | NamaMK | SKS | Smt |+--------+-------------------------------+-----+-----+| MK-01 | Sistem Basis Data | 3 | 1 | | MK-02 | Pemrgraman Basis Data | 2 | 3 | | MK-03 | Pengantat Teknologi Informasi | 3 | 2 | | MK-04 | Logika Informantika | 2 | 1 | +--------+-------------------------------+-----+-----+4 rows in set (0.00 sec)mysql> insert into tblMK values -> ('MK-05','Bahasa Inggris Informatika',3,1);Query OK, 1 row affected (0.00 sec)mysql> select * from tblMK;+--------+-------------------------------+-----+-----+| KodeMK | NamaMK | SKS | Smt |+--------+-------------------------------+-----+-----+| MK-01 | Sistem Basis Data | 3 | 1 | | MK-02 | Pemrgraman Basis Data | 2 | 3 | | MK-03 | Pengantat Teknologi Informasi | 3 | 2 | | MK-04 | Logika Informantika | 2 | 1 | | MK-05 | Bahasa Inggris Informatika | 3 | 1 | +--------+-------------------------------+-----+-----+5 rows in set (0.00 sec)mysql> desc tblNilai;+----------+---------------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+----------+---------------------+------+-----+---------+-------+| NIM | char(9) | NO | PRI | | | | KodeMK | char(5) | NO | PRI | | | | TTS | tinyint(3) unsigned | NO | | 0 | | | TAS | tinyint(3) unsigned | NO | | 0 | | | Tugas | tinyint(3) unsigned | NO | | 0 | | | NilAngka | decimal(6,2) | YES | | NULL | | | NilHuruf | char(1) | YES | | NULL | | +----------+---------------------+------+-----+---------+-------+7 rows in set (0.00 sec)mysql> insert into tblNilai (NIM,KodeMK,TTS,TAS,Tugas) values -> ('223120001','MK-01',85,80,100);Query OK, 1 row affected (0.00 sec)mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | NULL | NULL | +-----------+--------+-----+-----+-------+----------+----------+1 row in set (0.00 sec)mysql> alter table tblNilai modify NilAngka Decimal(6,2) Not Null Default 0.0;Query OK, 1 row affected, 1 warning (0.01 sec)Records: 1 Duplicates: 0 Warnings: 1mysql> desc tblNilai;+----------+---------------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+----------+---------------------+------+-----+---------+-------+| NIM | char(9) | NO | PRI | | | | KodeMK | char(5) | NO | PRI | | | | TTS | tinyint(3) unsigned | NO | | 0 | | | TAS | tinyint(3) unsigned | NO | | 0 | | | Tugas | tinyint(3) unsigned | NO | | 0 | | | NilAngka | decimal(6,2) | NO | | 0.00 | | | NilHuruf | char(1) | YES | | NULL | | +----------+---------------------+------+-----+---------+-------+7 rows in set (0.01 sec)mysql> alter table tblNilai modify NilHuruf Not Null Default 'E';ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Not Null Default 'E'' at line 1mysql> alter table tblHuruf modify NilHuruf Not Null Default 'E';ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Not Null Default 'E'' at line 1mysql> alter table tblNilai modify NilHuruf Not Null Default 'E';ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Not Null Default 'E'' at line 1mysql> alter table tblNilai modify NilHuruf char(1) Not Null Default 'E';Query OK, 1 row affected, 1 warning (0.03 sec)Records: 1 Duplicates: 0 Warnings: 1mysql> desc tblNilai;+----------+---------------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+----------+---------------------+------+-----+---------+-------+| NIM | char(9) | NO | PRI | | | | KodeMK | char(5) | NO | PRI | | | | TTS | tinyint(3) unsigned | NO | | 0 | | | TAS | tinyint(3) unsigned | NO | | 0 | | | Tugas | tinyint(3) unsigned | NO | | 0 | | | NilAngka | decimal(6,2) | NO | | 0.00 | | | NilHuruf | char(1) | NO | | E | | +----------+---------------------+------+-----+---------+-------+7 rows in set (0.00 sec)mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 0.00 | | +-----------+--------+-----+-----+-------+----------+----------+1 row in set (0.00 sec)mysql> insert into tblNilai (NIM,KodeMK,TTS,TAS,Tugas) values -> ('223120001','MK-03',75,60,80);Query OK, 1 row affected (0.00 sec)mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 0.00 | | | 223120001 | MK-03 | 75 | 60 | 80 | 0.00 | E | +-----------+--------+-----+-----+-------+----------+----------+2 rows in set (0.00 sec)mysql> select * from tblMhs;+-----------+--------------+------------+----------+---------------------------------+| NIM | NamaMhs | TglLahir | JenisKel | Alamat |+-----------+--------------+------------+----------+---------------------------------+| 223120001 | Budi Susanto | 1995-10-23 | Pria | Jl. Jend. Sudirman No. 12 Smg | | 223120002 | Indahwati | 1995-04-13 | Wanita | Jln. Pemuda No. 8 Ungaran | | 223120003 | Yuliana | 1996-08-06 | Wanita | Gang Mangga No. 34 Kendal | | 223120004 | Eko Wahyudi | 1994-04-28 | Pria | Jln. Ahmad Yani No. 14 Semarang | | 223120005 | Bambang W | 1996-11-09 | Pria | Jln. Hanoman No. 27 Salatiga | +-----------+--------------+------------+----------+---------------------------------+5 rows in set (0.00 sec)mysql> select * from tblMK;+--------+-------------------------------+-----+-----+| KodeMK | NamaMK | SKS | Smt |+--------+-------------------------------+-----+-----+| MK-01 | Sistem Basis Data | 3 | 1 | | MK-02 | Pemrgraman Basis Data | 2 | 3 | | MK-03 | Pengantat Teknologi Informasi | 3 | 2 | | MK-04 | Logika Informantika | 2 | 1 | | MK-05 | Bahasa Inggris Informatika | 3 | 1 | +--------+-------------------------------+-----+-----+5 rows in set (0.00 sec)mysql> insert into tblNilai (NIM,KodeMK,TTS,TAS,Tugas) values -> ('223120001','MK-04',80,90,100), -> ('223120002','MK-02',50,70,85), -> ('223120002','MK-03',65,75,75), -> ('223120002','MK-05',75,55,80), -> ('223120003','MK-01',95,80,100), -> ('223120003','MK-02',90,85,100), -> ('223120003','MK-04',95,90,90), -> ('223120003','MK-04',100,95,100), -> ('223120004','MK-02',90,65,70), -> ('223120004','MK-03',70,55,80), -> ('223120004','MK-05',60,50,65);ERROR 1062 (23000): Duplicate entry '223120003-MK-04' for key 1mysql> select * from tblMK;+--------+-------------------------------+-----+-----+| KodeMK | NamaMK | SKS | Smt |+--------+-------------------------------+-----+-----+| MK-01 | Sistem Basis Data | 3 | 1 | | MK-02 | Pemrgraman Basis Data | 2 | 3 | | MK-03 | Pengantat Teknologi Informasi | 3 | 2 | | MK-04 | Logika Informantika | 2 | 1 | | MK-05 | Bahasa Inggris Informatika | 3 | 1 | +--------+-------------------------------+-----+-----+5 rows in set (0.00 sec)mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 0.00 | | | 223120001 | MK-03 | 75 | 60 | 80 | 0.00 | E | | 223120001 | MK-04 | 80 | 90 | 100 | 0.00 | E | | 223120002 | MK-02 | 50 | 70 | 85 | 0.00 | E | | 223120002 | MK-03 | 65 | 75 | 75 | 0.00 | E | | 223120002 | MK-05 | 75 | 55 | 80 | 0.00 | E | | 223120003 | MK-01 | 95 | 80 | 100 | 0.00 | E | | 223120003 | MK-02 | 90 | 85 | 100 | 0.00 | E | | 223120003 | MK-04 | 95 | 90 | 90 | 0.00 | E | +-----------+--------+-----+-----+-------+----------+----------+9 rows in set (0.00 sec)mysql> update tblNilai set NilHuruf like 'E' where NIM = '223120001' and KodeMK = 'MK-01';ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like 'E' where NIM = '223120001' and KodeMK = 'MK-01'' at line 1mysql> update tblNilai set NilHuruf = 'E' where NIM = '223120001' and KodeMK = 'MK-01';Query OK, 1 row affected (0.02 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 0.00 | E | | 223120001 | MK-03 | 75 | 60 | 80 | 0.00 | E | | 223120001 | MK-04 | 80 | 90 | 100 | 0.00 | E | | 223120002 | MK-02 | 50 | 70 | 85 | 0.00 | E | | 223120002 | MK-03 | 65 | 75 | 75 | 0.00 | E | | 223120002 | MK-05 | 75 | 55 | 80 | 0.00 | E | | 223120003 | MK-01 | 95 | 80 | 100 | 0.00 | E | | 223120003 | MK-02 | 90 | 85 | 100 | 0.00 | E | | 223120003 | MK-04 | 95 | 90 | 90 | 0.00 | E | +-----------+--------+-----+-----+-------+----------+----------+9 rows in set (0.00 sec)mysql> insert into tblNilai (NIM,KodeMK,TTS,TAS,Tugas) values -> ('223120004','MK-02',90,65,70), -> ('223120004','MK-03',70,55,80), -> ('223120004','MK-05',60,50,65);Query OK, 3 rows affected (0.00 sec)Records: 3 Duplicates: 0 Warnings: 0mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 0.00 | E | | 223120001 | MK-03 | 75 | 60 | 80 | 0.00 | E | | 223120001 | MK-04 | 80 | 90 | 100 | 0.00 | E | | 223120002 | MK-02 | 50 | 70 | 85 | 0.00 | E | | 223120002 | MK-03 | 65 | 75 | 75 | 0.00 | E | | 223120002 | MK-05 | 75 | 55 | 80 | 0.00 | E | | 223120003 | MK-01 | 95 | 80 | 100 | 0.00 | E | | 223120003 | MK-02 | 90 | 85 | 100 | 0.00 | E | | 223120003 | MK-04 | 95 | 90 | 90 | 0.00 | E | | 223120004 | MK-02 | 90 | 65 | 70 | 0.00 | E | | 223120004 | MK-03 | 70 | 55 | 80 | 0.00 | E | | 223120004 | MK-05 | 60 | 50 | 65 | 0.00 | E | +-----------+--------+-----+-----+-------+----------+----------+12 rows in set (0.00 sec)mysql> insert into tblNilai (NIM,KodeMK,TTS,TAS,Tugas) values -> ('223120004','MK-01',50,65,80);Query OK, 1 row affected (0.00 sec)mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 0.00 | E | | 223120001 | MK-03 | 75 | 60 | 80 | 0.00 | E | | 223120001 | MK-04 | 80 | 90 | 100 | 0.00 | E | | 223120002 | MK-02 | 50 | 70 | 85 | 0.00 | E | | 223120002 | MK-03 | 65 | 75 | 75 | 0.00 | E | | 223120002 | MK-05 | 75 | 55 | 80 | 0.00 | E | | 223120003 | MK-01 | 95 | 80 | 100 | 0.00 | E | | 223120003 | MK-02 | 90 | 85 | 100 | 0.00 | E | | 223120003 | MK-04 | 95 | 90 | 90 | 0.00 | E | | 223120004 | MK-02 | 90 | 65 | 70 | 0.00 | E | | 223120004 | MK-03 | 70 | 55 | 80 | 0.00 | E | | 223120004 | MK-05 | 60 | 50 | 65 | 0.00 | E | | 223120004 | MK-01 | 50 | 65 | 80 | 0.00 | E | +-----------+--------+-----+-----+-------+----------+----------+13 rows in set (0.00 sec)mysql> insert into tblNilai (NIM,KodeMK,TTS,TAS,Tugas) values -> ('223120005','MK-03',85,75,100), -> ('223120005','MK-04',75,65,70);Query OK, 2 rows affected (0.00 sec)Records: 2 Duplicates: 0 Warnings: 0mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 0.00 | E | | 223120001 | MK-03 | 75 | 60 | 80 | 0.00 | E | | 223120001 | MK-04 | 80 | 90 | 100 | 0.00 | E | | 223120002 | MK-02 | 50 | 70 | 85 | 0.00 | E | | 223120002 | MK-03 | 65 | 75 | 75 | 0.00 | E | | 223120002 | MK-05 | 75 | 55 | 80 | 0.00 | E | | 223120003 | MK-01 | 95 | 80 | 100 | 0.00 | E | | 223120003 | MK-02 | 90 | 85 | 100 | 0.00 | E | | 223120003 | MK-04 | 95 | 90 | 90 | 0.00 | E | | 223120004 | MK-02 | 90 | 65 | 70 | 0.00 | E | | 223120004 | MK-03 | 70 | 55 | 80 | 0.00 | E | | 223120004 | MK-05 | 60 | 50 | 65 | 0.00 | E | | 223120004 | MK-01 | 50 | 65 | 80 | 0.00 | E | | 223120005 | MK-03 | 85 | 75 | 100 | 0.00 | E | | 223120005 | MK-04 | 75 | 65 | 70 | 0.00 | E | +-----------+--------+-----+-----+-------+----------+----------+15 rows in set (0.00 sec)mysql> update tblNilai set nilAngka = 0.25*Tugas+0.35*TTS+0.4*TAS;Query OK, 15 rows affected (0.14 sec)Rows matched: 15 Changed: 15 Warnings: 0mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 86.75 | E | | 223120001 | MK-03 | 75 | 60 | 80 | 70.25 | E | | 223120001 | MK-04 | 80 | 90 | 100 | 89.00 | E | | 223120002 | MK-02 | 50 | 70 | 85 | 66.75 | E | | 223120002 | MK-03 | 65 | 75 | 75 | 71.50 | E | | 223120002 | MK-05 | 75 | 55 | 80 | 68.25 | E | | 223120003 | MK-01 | 95 | 80 | 100 | 90.25 | E | | 223120003 | MK-02 | 90 | 85 | 100 | 90.50 | E | | 223120003 | MK-04 | 95 | 90 | 90 | 91.75 | E | | 223120004 | MK-02 | 90 | 65 | 70 | 75.00 | E | | 223120004 | MK-03 | 70 | 55 | 80 | 66.50 | E | | 223120004 | MK-05 | 60 | 50 | 65 | 57.25 | E | | 223120004 | MK-01 | 50 | 65 | 80 | 63.50 | E | | 223120005 | MK-03 | 85 | 75 | 100 | 84.75 | E | | 223120005 | MK-04 | 75 | 65 | 70 | 69.75 | E | +-----------+--------+-----+-----+-------+----------+----------+15 rows in set (0.05 sec)mysql> update tblNilai set nilHuruf = 'A' where NilAngka >= 85;Query OK, 5 rows affected (0.00 sec)Rows matched: 5 Changed: 5 Warnings: 0mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 86.75 | A | | 223120001 | MK-03 | 75 | 60 | 80 | 70.25 | E | | 223120001 | MK-04 | 80 | 90 | 100 | 89.00 | A | | 223120002 | MK-02 | 50 | 70 | 85 | 66.75 | E | | 223120002 | MK-03 | 65 | 75 | 75 | 71.50 | E | | 223120002 | MK-05 | 75 | 55 | 80 | 68.25 | E | | 223120003 | MK-01 | 95 | 80 | 100 | 90.25 | A | | 223120003 | MK-02 | 90 | 85 | 100 | 90.50 | A | | 223120003 | MK-04 | 95 | 90 | 90 | 91.75 | A | | 223120004 | MK-02 | 90 | 65 | 70 | 75.00 | E | | 223120004 | MK-03 | 70 | 55 | 80 | 66.50 | E | | 223120004 | MK-05 | 60 | 50 | 65 | 57.25 | E | | 223120004 | MK-01 | 50 | 65 | 80 | 63.50 | E | | 223120005 | MK-03 | 85 | 75 | 100 | 84.75 | E | | 223120005 | MK-04 | 75 | 65 | 70 | 69.75 | E | +-----------+--------+-----+-----+-------+----------+----------+15 rows in set (0.00 sec)mysql> update tblNilai set nilHuruf = 'B' where NilAngka >= 70 and NilAngka < 85;Query OK, 4 rows affected (0.02 sec)Rows matched: 4 Changed: 4 Warnings: 0mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 86.75 | A | | 223120001 | MK-03 | 75 | 60 | 80 | 70.25 | B | | 223120001 | MK-04 | 80 | 90 | 100 | 89.00 | A | | 223120002 | MK-02 | 50 | 70 | 85 | 66.75 | E | | 223120002 | MK-03 | 65 | 75 | 75 | 71.50 | B | | 223120002 | MK-05 | 75 | 55 | 80 | 68.25 | E | | 223120003 | MK-01 | 95 | 80 | 100 | 90.25 | A | | 223120003 | MK-02 | 90 | 85 | 100 | 90.50 | A | | 223120003 | MK-04 | 95 | 90 | 90 | 91.75 | A | | 223120004 | MK-02 | 90 | 65 | 70 | 75.00 | B | | 223120004 | MK-03 | 70 | 55 | 80 | 66.50 | E | | 223120004 | MK-05 | 60 | 50 | 65 | 57.25 | E | | 223120004 | MK-01 | 50 | 65 | 80 | 63.50 | E | | 223120005 | MK-03 | 85 | 75 | 100 | 84.75 | B | | 223120005 | MK-04 | 75 | 65 | 70 | 69.75 | E | +-----------+--------+-----+-----+-------+----------+----------+15 rows in set (0.00 sec)mysql> update tblNilai set nilHuruf = 'C' where NilAngka >= 60 and NilAngka < 70;Query OK, 5 rows affected (0.00 sec)Rows matched: 5 Changed: 5 Warnings: 0mysql> update tblNilai set nilHuruf = 'D' where NilAngka >= 50 and NilAngka < 60;Query OK, 1 row affected (0.00 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> update tblNilai set nilHuruf = 'E' where NilAngka < 50;Query OK, 0 rows affected (0.00 sec)Rows matched: 0 Changed: 0 Warnings: 0mysql> select * from tblNilai;+-----------+--------+-----+-----+-------+----------+----------+| NIM | KodeMK | TTS | TAS | Tugas | NilAngka | NilHuruf |+-----------+--------+-----+-----+-------+----------+----------+| 223120001 | MK-01 | 85 | 80 | 100 | 86.75 | A | | 223120001 | MK-03 | 75 | 60 | 80 | 70.25 | B | | 223120001 | MK-04 | 80 | 90 | 100 | 89.00 | A | | 223120002 | MK-02 | 50 | 70 | 85 | 66.75 | C | | 223120002 | MK-03 | 65 | 75 | 75 | 71.50 | B | | 223120002 | MK-05 | 75 | 55 | 80 | 68.25 | C | | 223120003 | MK-01 | 95 | 80 | 100 | 90.25 | A | | 223120003 | MK-02 | 90 | 85 | 100 | 90.50 | A | | 223120003 | MK-04 | 95 | 90 | 90 | 91.75 | A | | 223120004 | MK-02 | 90 | 65 | 70 | 75.00 | B | | 223120004 | MK-03 | 70 | 55 | 80 | 66.50 | C | | 223120004 | MK-05 | 60 | 50 | 65 | 57.25 | D | | 223120004 | MK-01 | 50 | 65 | 80 | 63.50 | C | | 223120005 | MK-03 | 85 | 75 | 100 | 84.75 | B | | 223120005 | MK-04 | 75 | 65 | 70 | 69.75 | C | +-----------+--------+-----+-----+-------+----------+----------+15 rows in set (0.00 sec)mysql> \t