0% found this document useful (0 votes)
55 views1 page

Script Basis Data

The document contains SQL statements to insert sample data into multiple tables, update some records, and delete other records. It inserts data into tables for product categories, products, stores, employees, and transactions. It also includes a SQL statement to perform a cross join between two tables and limit the results.

Uploaded by

Star Leon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views1 page

Script Basis Data

The document contains SQL statements to insert sample data into multiple tables, update some records, and delete other records. It inserts data into tables for product categories, products, stores, employees, and transactions. It also includes a SQL statement to perform a cross join between two tables and limit the results.

Uploaded by

Star Leon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

insert into jenis (ID_JENIS,ID_KATEGORI,NAMA_JENIS) values ('01','101','makanan'),

('02','102','makanan'),('03','103','makanan'),('04','104','makanan'),
('05','105','makanan'),('06','106','minuman'),('07','107','minuman'),
('08','108','minuman'),('09','109','minuman'),('10','110','minuman');
update jenis set ID_KATEGORI='111' where ID_JENIS='10';
delete from jenis where ID_KATEGORI='111';

insert into kasir (ID_KASIR,NAMA_KASIR,TELP_KASIR) values ('1001','wanda','02021'),


('1002','iwan','02022'),('1003','dimas','02023'),('1004','rama','02024'),
('1005','bintang','02025'),('1006','cipung','02026'),('1007','abel','02027'),
('1008','indra','02028'),('1009','irgy','02029'),('1010','ryan','02030');
update kasir set ID_kasir='1011' where nama_kasir='ryan';
delete from kasir where ID_kasir='1011';

insert into kategori (ID_KATEGORI,NAMA_KATEGORI) values ('101','makanan ringan'),


('102','makanan ringan'),('103','makanan berat'),('104','makanan berat'),
('105','makanan berat'),('106','minuman panas'),('107','minuman panas'),
('108','minuman dingin'),('109','minuman dingin'),('110','minuman dingin');
update kategori set ID_KATEGORI='110' where ID_KATEGORI='1010';
delete from kategori where ID_KATEGORI='110';

insert into outlet (ID_OUTLET,NAMA_OUTLET,STATUS_OUTLET,TGL_SEWA_OUTLET) values


('5001','wanda','02021'),('5002','iwan','02022'),('5003','dimas','02023'),
('5004','rama','02024'),('5005','bintang','02025'),('5006','cipung','02026'),
('5007','abel','02027'),('5008','indra','02028'),('5009','irgy','02029'),
('5010','ryan','02030');

insert into penjual


(ID_PENJUAL,ID_OUTLET,NAMA_PENJUAL,ALAMAT_PENJUAL,TELP_PENJUAL,STATUS_PENJUAL)
values ('1001','wanda','02021'),('1002','iwan','02022'),('1003','dimas','02023'),
('1004','rama','02024'),('1005','bintang','02025'),('1006','cipung','02026'),
('1007','abel','02027'),('1008','indra','02028'),('1009','irgy','02029'),
('1010','ryan','02030');

insert into produk


(ID_PRODUK,ID_JENIS,ID_OUTLET,NAMA_PRODUK,HARGA_PRODUK,STOCK_PRODUK) values
('1001','wanda','02021'),('1002','iwan','02022'),('1003','dimas','02023'),
('1004','rama','02024'),('1005','bintang','02025'),('1006','cipung','02026'),
('1007','abel','02027'),('1008','indra','02028'),('1009','irgy','02029'),
('1010','ryan','02030');

insert into transaksi


(ID_TRANSAKSI,ID_KASIR,ID_PRODUK,NAMA_PESANAN,JUMLAH_TRANSAKSI,TOTAL_TRANSAKSI,TGL_
TRANSAKSI) values ('1001','wanda','02021'),('1002','iwan','02022'),
('1003','dimas','02023'),('1004','rama','02024'),('1005','bintang','02025'),
('1006','cipung','02026'),('1007','abel','02027'),('1008','indra','02028'),
('1009','irgy','02029'),('1010','ryan','02030');

select * from jenis cross join bagian limit 5;

You might also like