Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\nurcholis>cd\
C:\>f:
F:\>cd xampp\mysql\bin
F:\xampp\mysql\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.27 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
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 statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| db_akademik |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
| webauth |
+--------------------+
8 rows in set (0.01 sec)
mysql> create database db_penjualan;
Query OK, 1 row affected (0.00 sec)
mysql> use db_penjualan;
Database changed
mysql> create table tb_barang(kd_brg varchar(10) not null primary key, nama_brg
varchar(30), hrg_beli int, hrg_jual int);
Query OK, 0 rows affected (0.27 sec)
mysql> create table tb_customer(kd_cus varchar(10) not null primary key, nama_cu
s varchar(30), alamat varchar(50));
Query OK, 0 rows affected (0.20 sec)
mysql> create table tb_transaksi(no_trans varchar(10) not null primary key, kd_c
us varchar(10), kd_brg varchar(10), jumlah int, tgl date);
Query OK, 0 rows affected (0.46 sec)
mysql> insert into tb_barang values ('01','Buku',5000,7000);
Query OK, 1 row affected (0.13 sec)
mysql> insert into tb_barang values ('02','Pensil',2000,4000);
Query OK, 1 row affected (0.19 sec)
mysql> insert into tb_barang values ('03','Keyboard',50000,70000);
Query OK, 1 row affected (0.08 sec)
mysql> insert into tb_barang values ('04','Mouse',30000,35000);
Query OK, 1 row affected (0.08 sec)
mysql> select *from tb_barang;
+--------+----------+----------+----------+
| kd_brg | nama_brg | hrg_beli | hrg_jual |
+--------+----------+----------+----------+
| 01 | Buku | 5000 | 7000 |
| 02 | Pensil | 2000 | 4000 |
| 03 | Keyboard | 50000 | 70000 |
| 04 | Mouse | 30000 | 35000 |
+--------+----------+----------+----------+
4 rows in set (0.00 sec)
mysql> insert into tb_customer values ('C01','Abdul','Sleman');
Query OK, 1 row affected (0.12 sec)
mysql> insert into tb_customer values ('C02','Mansur','Sleman');
Query OK, 1 row affected (0.16 sec)
mysql> insert into tb_customer values ('C03','Sumino','Bantul');
Query OK, 1 row affected (0.13 sec)
mysql> insert into tb_customer values ('C04','Rohimat','Wonosari');
Query OK, 1 row affected (0.08 sec)
mysql> select *from tb_customer;
+--------+----------+----------+
| kd_cus | nama_cus | alamat |
+--------+----------+----------+
| C01 | Abdul | Sleman |
| C02 | Mansur | Sleman |
| C03 | Sumino | Bantul |
| C04 | Rohimat | Wonosari |
+--------+----------+----------+
4 rows in set (0.00 sec)
mysql> insert into tb_transaksi values ('T001','01','C01',10,'2014-02-01');
Query OK, 1 row affected (0.15 sec)
mysql> insert into tb_transaksi values ('T002','02','C02',80,'2014-02-04');
Query OK, 1 row affected (0.10 sec)
mysql> insert into tb_transaksi values ('T003','03','C03',30,'2014-02-05');
Query OK, 1 row affected (0.06 sec)
mysql> insert into tb_transaksi values ('T004','04','C04',50,'2014-02-08');
Query OK, 1 row affected (0.07 sec)
mysql> select *from tb_transaksi;
+----------+--------+--------+--------+------------+
| no_trans | kd_cus | kd_brg | jumlah | tgl |
+----------+--------+--------+--------+------------+
| T001 | 01 | C01 | 10 | 2014-02-01 |
| T002 | 02 | C02 | 80 | 2014-02-04 |
| T003 | 03 | C03 | 30 | 2014-02-05 |
| T004 | 04 | C04 | 50 | 2014-02-08 |
+----------+--------+--------+--------+------------+
4 rows in set (0.00 sec)
skip to main |
skip to sidebar
Hari Ini Lebih Baik Dari Hari Kemarin
My Profil
.
Total Ditayangkan
Entri Populer
-
Yogyakarta, 10 Februari 2013 Perihal : Bantuan dana Tugas Ahir Sekolah Sarjana S1 Kepada yth, Bapak Bupati Kotawari...
-
<html> <head> <title>::Penjumlahan::</title> </head> <body> <h2>Penjumlahan</h2> ...
-
SISTEM PENDUKUNG KEPUTUSAN PEMILIHAN JURUSAN DI SMA MENGGUNAKAN ANALYTICAL HIERARCHY PROCESS (AHP) (STUDI KASUS SMA NEGERI 2 KUMAI) ...
Saya...!!!!
![Saya...!!!!](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0iU9L6BF908qZP3z859kKJwfX_cGscFEyGVyvBF9ZeJqlpLvVyugwo3vB670C1J8I8bNv7npuvbeSLPe0RciTzyzx_SVs4aAO0EskWUSYuf0Cs0-2UCifOq7DkxbTMlcv-sn97leNmSLb/s150/a1.jpg)
Hak Cipta By. cholisgroup.com. Powered by Blogger.
0 comments:
Post a Comment