Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\PH36>cd\ C:\>xampp\mysql\bin\mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.0.41-community-nt MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use dbph Database changed mysql> show tables -> ; +----------------+ | Tables_in_dbph | +----------------+ | tblkomputer | | tblsiswa | +----------------+ 2 rows in set (0.00 sec) mysql> select tblsiswa.*. tblkomputer.* from -> tblsiswa,tblkomputer where tblsiswa.nis=tblkomputer.nis; 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 '. tbl komputer.* from tblsiswa,tblkomputer where tblsiswa.nis=tblkomputer.nis' at line 1 mysql> select tblsiswa.*, tblkomputer.* from -> tblsiswa,tblkomputer where tblsiswa.nis=tblkomputer.nis; +-----+---------+-----------+------+-------------------+---------------+-------+ ------+ | nis | nama | jk | umur | hoby | kode_komputer | jenis | nis | +-----+---------+-----------+------+-------------------+---------------+-------+ ------+ | 101 | Sky | laki-laki | 19 | mancing keributan | a1 | p4 | 101 | | 102 | Wati | perempuan | 19 | baca absen | a2 | p4 | 102 | | 103 | Rani | perempuan | 18 | keriting rambut | a2 | c2 | 103 | | 104 | Chandra | laki-laki | 18 | menangis sendiri | a4 | c2 | 104 | | 105 | Anthony | laki-laki | 17 | tertawa sendiri | a1 | p4 | 105 | | 106 | Yopi | laki-laki | 39 | playboy | a2 | p4 | 106 | +-----+---------+-----------+------+-------------------+---------------+-------+ ------+ 6 rows in set (0.03 sec) mysql> select nis from tblsiswa; +-----+ | nis | +-----+
| 101 | | 102 | | 103 | | 104 | | 105 | | 106 | +-----+ 6 rows in set (0.00 sec) mysql> select jk from tblsiswa; +-----------+ | jk | +-----------+ | laki-laki | | perempuan | | perempuan | | laki-laki | | laki-laki | | laki-laki | +-----------+ 6 rows in set (0.00 sec) mysql> select tblsiswa.nis,tblsiswa from tblsiswa; ERROR 1054 (42S22): Unknown column 'tblsiswa' in 'field list' mysql> select tblsiswa.nis,tblsiswa.jk from tblsiswa; +-----+-----------+ | nis | jk | +-----+-----------+ | 101 | laki-laki | | 102 | perempuan | | 103 | perempuan | | 104 | laki-laki | | 105 | laki-laki | | 106 | laki-laki | +-----+-----------+ 6 rows in set (0.00 sec) mysql> select tblsiswa.nis,tblsiswa.nama from tblsiswa; +-----+---------+ | nis | nama | +-----+---------+ | 101 | Sky | | 102 | Wati | | 103 | Rani | | 104 | Chandra | | 105 | Anthony | | 106 | Yopi | +-----+---------+ 6 rows in set (0.00 sec) mysql> select tblsiswa.nis,tblsiswa.nama,tblsiswa.kode_komputer,tblsiswa.jenis; ERROR 1109 (42S02): Unknown table 'tblsiswa' in field list mysql> select from tblsiswa.nis,tblsiswa.nama,tblsiswa.kode_komputer,tblsiswa.je nis; 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 'from tblsiswa.nis,tblsiswa.nama,tblsiswa.kode_komputer,tblsiswa.jenis' at line 1 mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode)komputer
-> nis.nama.kode_komputer.jenis; 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 ')komp uter nis.nama.kode_komputer.jenis' at line 1 mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode)komputer -> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode)komputer; 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 ')komp uter select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode)komputer' at line 1 mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer; ERROR 1109 (42S02): Unknown table 'tblsiswa' in field list mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer -> nis.nama.kode_komputer.jenis; 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 '.nama .kode_komputer.jenis' at line 2 mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer -> tblkomputer.jenis from tblsiswa,tblsiswa where -> tblsiswa.nis=tblkomputer.nis; 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 '.jeni s from tblsiswa,tblsiswa where tblsiswa.nis=tblkomputer.nis' at line 2 mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblsiswa,tblsiswa where -> tblsiswa.nis=tblkomputer.nis; ERROR 1066 (42000): Not unique table/alias: 'tblsiswa' mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblsiswa,tblsiswa where -> tblsiswa.nis=tblkomputer.nis; ERROR 1066 (42000): Not unique table/alias: 'tblsiswa' mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblsiswa,tblsiswa where -> tblsiswa.nis=tblkomputer.nis; ERROR 1066 (42000): Not unique table/alias: 'tblsiswa' mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblkomputer,tblsiswa where -> tblsiswa.nis=tblkomputer.nis; +-----+---------+---------------+-------+ | nis | nama | kode_komputer | jenis | +-----+---------+---------------+-------+ | 101 | Sky | a1 | p4 | | 102 | Wati | a2 | p4 | | 103 | Rani | a2 | c2 | | 104 | Chandra | a4 | c2 | | 105 | Anthony | a1 | p4 | | 106 | Yopi | a2 | p4 | +-----+---------+---------------+-------+ 6 rows in set (0.00 sec) mysql> mysql> mysql> mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblkomputer,tblsiswa where -> tblsiswa.nis=tblkomputer.nis and tblkomputer.jenis='p4';
+-----+---------+---------------+-------+ | nis | nama | kode_komputer | jenis | +-----+---------+---------------+-------+ | 101 | Sky | a1 | p4 | | 102 | Wati | a2 | p4 | | 105 | Anthony | a1 | p4 | | 106 | Yopi | a2 | p4 | +-----+---------+---------------+-------+ 4 rows in set (0.02 sec) mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblkomputer,tblsiswa where -> tblsiswa.nis=tblkomputer.nis -> nis and tblkomputer.jenis='c2'; 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 'nis a nd tblkomputer.jenis='c2'' at line 4 mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblkomputer,tblsiswa where -> tblsiswa.nis=tblkomputer.nis and tblkomputer.jenis='c2'; +-----+---------+---------------+-------+ | nis | nama | kode_komputer | jenis | +-----+---------+---------------+-------+ | 103 | Rani | a2 | c2 | | 104 | Chandra | a4 | c2 | +-----+---------+---------------+-------+ 2 rows in set (0.02 sec) mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblkomputer,tblsiswa where -> tblsiswa.nis=tblkomputer.nis and tblkomputer.kode_komputer='a2'; +-----+------+---------------+-------+ | nis | nama | kode_komputer | jenis | +-----+------+---------------+-------+ | 102 | Wati | a2 | p4 | | 103 | Rani | a2 | c2 | | 106 | Yopi | a2 | p4 | +-----+------+---------------+-------+ 3 rows in set (0.00 sec) mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblkomputer,tblsiswa where -> tblsiswa.nis=tblkomputer.nis and tblkomputer.jenis='c2'; +-----+---------+---------------+-------+ | nis | nama | kode_komputer | jenis | +-----+---------+---------------+-------+ | 103 | Rani | a2 | c2 | | 104 | Chandra | a4 | c2 | +-----+---------+---------------+-------+ 2 rows in set (0.00 sec) mysql> select tblsiswa.nis,tblsiswa.nama,tblkomputer.kode_komputer, -> tblkomputer.jenis from tblkomputer,tblsiswa where -> tblsiswa.nis=tblkomputer.nis and tblkomputer.jenis='p4' -> order by tblsiswa.nama; +-----+---------+---------------+-------+ | nis | nama | kode_komputer | jenis | +-----+---------+---------------+-------+
| 105 | Anthony | a1 | p4 | | 101 | Sky | a1 | p4 | | 102 | Wati | a2 | p4 | | 106 | Yopi | a2 | p4 | +-----+---------+---------------+-------+ 4 rows in set (0.02 sec) mysql>