You are on page 1of 4

MariaDB [(none)]> show databases;

+--------------------+
| Database |
+--------------------+
| dbSQLSBD |
| dbinventori |
| dblaundry |
| information_schema |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
+--------------------+
8 rows in set (0.12 sec)

MariaDB [(none)]> show tables from dbinventori;


+-----------------------+
| Tables_in_dbinventori |
+-----------------------+
| tblbarang |
| tblbeli |
| tbldetailbeli |
| tbldetailjual |
| tbljual |
| tblpelanggan |
| tblsupplier |
+-----------------------+
7 rows in set (0.06 sec)

MariaDB [(none)]> show fields from dbinventori.tblbarang;


+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| KodeBrg | char(7) | NO | PRI | NULL | |
| NamaBrg | varchar(30) | YES | | NULL | |
| Harga | int(8) | NO | | NULL | |
| Stok | int(4) | NO | | NULL | |
+---------+-------------+------+-----+---------+-------+
4 rows in set (0.07 sec)

MariaDB [(none)]> show fields from dbinventori.tblpelanggan;


+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| KodePlg | char(6) | NO | PRI | NULL | |
| NamaPlg | varchar(30) | YES | | NULL | |
| Alamat | varchar(50) | YES | | NULL | |
| Telp | varchar(15) | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
4 rows in set (0.04 sec)

MariaDB [(none)]> show fields from dbinventori.tblsupplier;


+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| KodeSup | char(6) | NO | PRI | NULL | |
| NamaSup | varchar(30) | YES | | NULL | |
| Alamat | varchar(50) | YES | | NULL | |
| Telp | varchar(15) | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
4 rows in set (0.03 sec)

MariaDB [(none)]> show fields from dbinventori.tbljual;


+-----------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------+------+-----+---------+-------+
| NoFakJual | char(7) | NO | PRI | NULL | |
| TglJual | date | NO | | NULL | |
| KodePlg | char(6) | NO | | NULL | |
| TotItem | int(11) | NO | | 0 | |
| TotBayar | int(11) | NO | | 0 | |
+-----------+---------+------+-----+---------+-------+
5 rows in set (0.06 sec)

MariaDB [(none)]> show fields from dbinventori.tblbeli;


+----------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------+------+-----+---------+-------+
| NoFak | char(7) | NO | PRI | NULL | |
| TglFak | date | NO | | NULL | |
| KodeSup | char(6) | NO | PRI | NULL | |
| TotItem | int(11) | NO | | NULL | |
| TotBayar | int(11) | NO | | NULL | |
+----------+---------+------+-----+---------+-------+
5 rows in set (0.04 sec)

MariaDB [(none)]> show fields from dbinventori.tbldetailbeli;


+---------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+---------+------+-----+---------+-------+
| NoFak | char(7) | NO | | NULL | |
| KodeBrg | char(7) | NO | | NULL | |
| Jumlah | int(6) | NO | | NULL | |
+---------+---------+------+-----+---------+-------+
3 rows in set (0.03 sec)

MariaDB [(none)]> show fields from dbinventori.tbldetailjual;


+-----------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------+------+-----+---------+-------+
| NoFakJual | char(7) | NO | | NULL | |
| KodeBrg | char(7) | NO | | NULL | |
| Jumlah | int(6) | NO | | 0 | |
+-----------+---------+------+-----+---------+-------+
3 rows in set (0.03 sec)

MariaDB [(none)]> selelct * from dbinventori.tblbarang;


ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near
'selelct * from dbinventori.tblbarang' at line 1
MariaDB [(none)]> select * from dbinventori.tblbarang;
+---------+---------------------------+-------+------+
| KodeBrg | NamaBrg | Harga | Stok |
+---------+---------------------------+-------+------+
| BR-0001 | Sabun Mandi | 2400 | 282 |
| BR-0002 | Rokok Gudang Garam Filter | 15000 | 122 |
| BR-0003 | Pasta Gigi Close Up | 7500 | 326 |
| BR-0004 | Sikat Gigi Formula | 9750 | 190 |
| BR-0005 | Minyak Goreng Bimoli | 17500 | 48 |
| BR-0006 | Gula Pasir | 12500 | 123 |
+---------+---------------------------+-------+------+
6 rows in set (0.00 sec)

MariaDB [(none)]> select * from dbinventori.tblpelanggan;


+---------+------------------+-------------------------------------+--------------+
| KodePlg | NamaPlg | Alamat | Telp |
+---------+------------------+-------------------------------------+--------------+
| PL-001 | Catur Wibowo | Jln. Seroja II No. 34 Semarang | 024-7689505 |
| PL-002 | Siti Fatimah | Jln. Jend. Sudirman No. 45 Salatiga | 08212333435 |
| PL-003 | Budi Satrio | Jln. Menjangan Utara II No. 34 Pati | 081342543765 |
| PL-004 | Ahmad Burhanudin | Jln. Siliwangi No. 345 Semarang | 081765456890 |
| PL-005 | Agus Rochmad | Jln. LetJen. Suprapto No. 235 Kudus | 08123434422 |
+---------+------------------+-------------------------------------+--------------+
5 rows in set (0.02 sec)

MariaDB [(none)]> select * from dbinventori.tblsupplier;


+---------+-----------------------+---------------------------------------
+--------------+
| KodeSup | NamaSup | Alamat | Telp
|
+---------+-----------------------+---------------------------------------
+--------------+
| SP-01 | CV. Anugerah Jaya | Jln. Ahmad Yani No. 23 Semarang | 024-
5678345 |
| SP-02 | PT. Indo Semesta | Jln. Pemuda No. 113 Jakarta | 021-
3475442 |
| SP-03 | UD. Usaha Makmur | Jln. Borobudur Selatan I/12A Semarang |
0813245643 |
| SP-04 | PT. Sejati Maju | Jln. Merapi I No. 34 Ungaran |
08743765432 |
| SP-05 | CV. Bahtera Jaya | Jln. Kenari Raya No. 45 Salatiga |
081324345678 |
| SP-06 | UD. Maju Jaya Sentosa | Jln. Sendang Sari IV No. 113 Kudus |
083232114473 |
+---------+-----------------------+---------------------------------------
+--------------+
6 rows in set (0.03 sec)

MariaDB [(none)]> select * from dbinventori.tbljual;


+-----------+------------+---------+---------+----------+
| NoFakJual | TglJual | KodePlg | TotItem | TotBayar |
+-----------+------------+---------+---------+----------+
| FJ-0001 | 2017-09-30 | PL-001 | 5 | 26700 |
| FJ-0002 | 2017-09-30 | PL-002 | 6 | 56750 |
| FJ-0003 | 2017-09-30 | PL-003 | 12 | 177500 |
+-----------+------------+---------+---------+----------+
3 rows in set (0.00 sec)

MariaDB [(none)]> select * from dbinventori.tblbeli;


+---------+------------+---------+---------+----------+
| NoFak | TglFak | KodeSup | TotItem | TotBayar |
+---------+------------+---------+---------+----------+
| FO-0001 | 2016-11-08 | SP-01 | 23 | 96000 |
| FO-0002 | 2016-11-08 | SP-02 | 15 | 198750 |
| FO-0003 | 2017-09-30 | SP-03 | 310 | 3800000 |
| FO-0004 | 2017-09-30 | SP-05 | 475 | 3056250 |
+---------+------------+---------+---------+----------+
4 rows in set (0.04 sec)

MariaDB [(none)]> select * from dbinventori.tbldetailbeli;


+---------+---------+--------+
| NoFak | KodeBrg | Jumlah |
+---------+---------+--------+
| FO-0001 | BR-0001 | 15 |
| FO-0002 | BR-0002 | 10 |
| FO-0001 | BR-0003 | 8 |
| FO-0002 | BR-0004 | 5 |
| FO-0004 | BR-0001 | 150 |
| FO-0004 | BR-0003 | 210 |
| FO-0004 | BR-0004 | 115 |
+---------+---------+--------+
7 rows in set (0.05 sec)

MariaDB [(none)]> select * from dbinventori.tbldetailjual;


+-----------+---------+--------+
| NoFakJual | KodeBrg | Jumlah |
+-----------+---------+--------+
| FJ-0001 | BR-0001 | 3 |
| FJ-0001 | BR-0004 | 2 |
| FJ-0002 | BR-0003 | 2 |
| FJ-0002 | BR-0004 | 3 |
| FJ-0002 | BR-0006 | 1 |
| FJ-0003 | BR-0002 | 1 |
| FJ-0003 | BR-0005 | 5 |
| FJ-0003 | BR-0006 | 6 |
+-----------+---------+--------+
8 rows in set (0.00 sec)

MariaDB [(none)]> \t

You might also like