Advertisement
yoshoo

Untitled

Aug 19th, 2019
1,073
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE nasabah
  2. (kode_nasabah CHAR(10) PRIMARY KEY,
  3. nama_nasabah VARCHAR2(30) NOT NULL,
  4. jenis_kelamin CHAR(1) CHECK (jenis_kelamin IN('L','P')),
  5. tempat_lahir VARCHAR2(50),
  6. tanggal_lahir DATE,
  7. alamat VARCHAR(50),
  8. kode_petugas CHAR(10), CONSTRAINT fk_nasabah_petugas foreign KEY(kode_petugas)
  9. references petugas(kode_petugas) ON DELETE CASCADE);
  10.  
  11. INSERT INTO nasabah VALUES ('KN001','Irfan','L','Bandung','1-Jan-2000','Kebun Jeruk','KP001');
  12. INSERT INTO nasabah VALUES ('KN002','Mirana','P','Jakarta','1-Mar-2000','Kenali','KP001');
  13. INSERT INTO nasabah VALUES ('KN003','Luna','P','Bali','1-Jun-2000','Jelutung','KP001');
  14. SELECT * FROM nasabah;
Advertisement
RAW Paste Data Copied
Advertisement