Advertisement
yoshoo

Untitled

Aug 19th, 2019
1,094
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE peminjaman
  2. (kode_peminjaman CHAR(10) PRIMARY KEY,
  3. kode_kategori_peminjaman CHAR(10), CONSTRAINT fk_peminjaman_kat_pem
  4. foreign KEY(kode_kategori_peminjaman) references kategori_peminjaman(kode_kategori_peminjaman)
  5. ON DELETE CASCADE,
  6. kode_nasabah CHAR(10), CONSTRAINT fk_peminjaman_nasabah
  7. foreign KEY(kode_nasabah) references nasabah(kode_nasabah) ON DELETE CASCADE,
  8. nominal_peminjaman int);
  9. DESC peminjaman;
  10.  
  11. INSERT INTO peminjaman VALUES('PJ001','KP001','KN001','1000000');
  12. INSERT INTO peminjaman VALUES('PJ002','KP002','KN002','1500000');
  13. INSERT INTO peminjaman VALUES('PJ003','KP003','KN003','2000000');
  14. SELECT * FROM peminjaman;
Advertisement
RAW Paste Data Copied
Advertisement