text: drop table NhanVien;
  drop table ChiNhanh;
  drop table ChiTieu;
  drop table PhanCong;
  drop table Phongban;
  drop table DuAn;
  
  
  Create table NhanVien(
  maNV number GENERATED ALWAYS as IDENTITY(START with 100000 INCREMENT by 1),
  hoTen varchar2(50) NOT NULL,
  diaChi varchar2(100) NOT NULL,
  dienThoai number,
  email varchar2(100),
  maPhong number,
  chiNhanh number,
  luong number(20,2),
  chucVu number(1,0)
  );
  --Chuc vu 0 là nhân viên, 1 là giám đống
  
  Create table ChiNhanh(
  maCN number GENERATED ALWAYS as IDENTITY(START with 1 INCREMENT by 1),
  tenCN varchar2(50) NOT NULL,
  truongChiNhanh number NOT NULL
  );
  
  
  Create table PhongBan(
  maPhong number GENERATED ALWAYS as IDENTITY(START with 1 INCREMENT by 1),
  tenPhong varchar2(50) NOT NULL,
  truongPhong number NOT NULL,
  ngayNhanChuc date,
  soNhanVien number,
  chiNhanh number NOT NULL
  );
  
  Create table  DuAn(
  maDA number GENERATED ALWAYS as IDENTITY(START with 1 INCREMENT by 1),
  tenDA varchar2(50) NOT NULL,
  kinhPhi number(20,2),
  phongChuTri number,
  truongDA number
  );
  
  Create table ChiTieu(
  maChiTieu number GENERATED ALWAYS as IDENTITY(START with 1 INCREMENT by 1),
  tenChiTieu varchar2(50) NOT NULL,
  soTien number(20,2),
  duAn number NOT NULL
  );
  
  
  Create table PhanCong(
  maNV number,
  duAn number,
  vaiTro varchar2(20),
  phuCap number(20,2)
  );
  
  -------------------------------------------------
  -- PRIMARY KEY
  ALTER TABLE PhanCong
  ADD CONSTRAINT PK_PhanCong
  PRIMARY KEY(maNV, duAn);
  
  ALTER TABLE ChiNhanh
  ADD CONSTRAINT PK_ChiNhanh
  PRIMARY KEY(maCN);
  
  ALTER TABLE NhanVien
  ADD CONSTRAINT PK_NhanVien
  PRIMARY KEY(maNV);
  
  ALTER TABLE PhongBan
  ADD CONSTRAINT PK_PhongBan
  PRIMARY KEY(maPhong);
  
  ALTER TABLE DuAn
  ADD CONSTRAINT PK_DuAn
  PRIMARY KEY(maDA);
  
  ALTER TABLE ChiTieu
  ADD CONSTRAINT PK_ChiTieu
  PRIMARY KEY(maChiTieu);
  
  ------------------------------------------------
  --FK CHI NHÁNH - NHÂN VIÊN
  ALTER TABLE ChiNhanh
  ADD CONSTRAINT FK1_ChiNhanh_NhanVien 
  FOREIGN KEY(truongChiNhanh) 
  REFERENCES NhanVien(maNV);
  
  --FK NHÂN VIÊN - PHÒNG BAN
  ALTER TABLE NhanVien
  ADD CONSTRAINT FK1_NhanVien_PhongBan 
  FOREIGN KEY(maPhong) 
  REFERENCES PhongBan(maPhong);
  
  -- FK NHÂN VIÊN - CHI NHÁNH 
  ALTER TABLE NhanVien
  ADD CONSTRAINT FK2_NhanVien_ChiNhanh 
  FOREIGN KEY(chiNhanh) 
  REFERENCES ChiNhanh(maCN);
  
  -- FK PHÒNG BAN
  ALTER TABLE PhongBan
  ADD CONSTRAINT FK1_PhongBan_ChiNhanh
  FOREIGN KEY(chiNhanh) 
  REFERENCES ChiNhanh(maCN);
  
  ALTER TABLE PhongBan
  ADD CONSTRAINT FK2_PhongBan_NhanVien 
  FOREIGN KEY(truongPhong) 
  REFERENCES NhanVien(maNV);
  
  -- FK DỰ DÁN
  ALTER TABLE DuAn
  ADD CONSTRAINT FK1_DuAn_NhanVien
  FOREIGN KEY(truongDA) 
  REFERENCES NhanVien(maNV);
  
  ALTER TABLE DuAn
  ADD CONSTRAINT FK2_DuAn_PhongBan
  FOREIGN KEY(PhongChuTri) 
  REFERENCES PhongBan(maPhong);
  
  -- FK CHỈ TIÊU
  ALTER TABLE ChiTieu
  ADD CONSTRAINT FK1_ChiTieu_DuAn 
  FOREIGN KEY(duAn) 
  REFERENCES DuAn(maDA);
  
  -- FK PHÂN CÔNG
  ALTER TABLE PhanCong
  ADD CONSTRAINT FK1_PhanCong_DuAn 
  FOREIGN KEY(duAn) 
  REFERENCES DuAn(maDA);
  
  ALTER TABLE PhanCong
  ADD CONSTRAINT FK2_PhanCong_NhanVien
  FOREIGN KEY(maNV) 
  REFERENCES NhanVien(maNV);
  
  -- DELETE FK TO DROP TABLE
  alter table NhanVien drop constraint FK1_NhanVien_PhongBan
  alter table NhanVien drop constraint FK2_NhanVien_ChiNhanh
  
  -- Add column chucVu
  ALTER TABLE NhanVien ADD chucVu number(1,0)
  
  
  
  --data
  
  --reset identity
  ALTER TABLE CHINHANH MODIFY(ID Generated as Identity (START WITH 1));
  
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Vũ Minh Trí','Q12, HCM','0973178325','itvmtri@gmail.com', 8, 1, 69696969,1);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Vũ Thị Minh Trang','Q12, HCM','0909697895','vtmtrang@gmail.com', 2, 2, 9999999,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Đặng Bảo Trang','Quận Thủ Đức, HCM','0167627489','dbtrang@gmail.com', 2, 3, 23698712,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Nguyễn Đang Tích','Q2, HCM','0888999777','ndtich@gmail.com', 3, 3, 19999999,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Trần Thuỳ Bích Trầm','Q12, HCM','0123456789','ttbtram@gmail.com', 4, 4, 9999999,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Hoàng Anh Tú','Q1, HCM','0999999999','hatu@gmail.com', 1, 5, 199999999,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Trần Trung Tính','HCM','0999999999','EMAIL_01@gmail.com', 1, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Min mát','HCM','0999999999','EMAIL_02@gmail.com', 2, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Phan Thị Minh Phượng','HCM','0999999999','EMAIL_03@gmail.com', 2, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Phạm Quốc Toàn','HCM','0999999999','EMAIL_04@gmail.com', 3, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Phạm Ngọc Trí','HCM','0999999999','EMAIL_05@gmail.com', 3, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Bích Thị Vân Hoàng','HCM','0999999999','EMAIL_06@gmail.com', 5, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Hoàng Nhật Sương','HCM','0999999999','EMAIL_07@gmail.com', 8, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Ngô Thuỳ Tuyết Trinh','HCM','0999999999','EMAIL_08@gmail.com', 5, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Nguyễn Thái Duy','HCM','0999999999','EMAIL_09@gmail.com', 8, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Trần Trang Trọng','HCM','0999999999','EMAIL_10@gmail.com', 5, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Tưởng Gì Chứ','HCM','0999999999','EMAIL_11@gmail.com', 5, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Võ Hoài Sơn','HCM','0999999999','EMAIL_12@gmail.com', 5, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Hoàng Trung','HCM','0999999999','EMAIL_13@gmail.com', 5, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Vũ Trí','HCM','0999999999','EMAIL_14@gmail.com', 1, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Cường Kenvin','HCM','0999999999','EMAIL_15@gmail.com', 5, 5, 50000000,0);
  
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Trần Trường Sinh','HCM','0999999999','EMAIL_11@gmail.com', 5, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Lâm Động','HCM','0999999999','EMAIL_12@gmail.com', 5, 4, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Tiêu Viêm','HCM','0999999999','EMAIL_13@gmail.com', 5, 2, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Lăng Thanh Trúc','HCM','0999999999','EMAIL_14@gmail.com', 5, 7, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Tần Vũ','HCM','0999999999','EMAIL_15@gmail.com', 5, 6, 50000000,0);
  
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Lang Thang','HCM','0999999999','EMAIL_11@gmail.com', 1, 7, 50000000,0);
  
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Lâm Lang Thiên','HCM','0999999999','EMAIL_11@gmail.com', 6, 2, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Liên Đới','HCM','0999999999','EMAIL_12@gmail.com', 7, 2, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Tuỳ Tùng','HCM','0999999999','EMAIL_13@gmail.com', 8, 2, 50000000,0);
  
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Kha Ni Ni','HCM','0999999999','EMAIL_14@gmail.com', 9, 3, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Ngự Không','HCM','0999999999','EMAIL_15@gmail.com', 10, 3, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Lương Thanh Đoàn','HCM','0999999999','EMAIL_11@gmail.com', 11, 3, 50000000,0);
  
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Tần Chính','HCM','0999999999','EMAIL_12@gmail.com', 12, 4, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Băng Sương','HCM','0999999999','EMAIL_13@gmail.com', 13, 4, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Hầu Phí','HCM','0999999999','EMAIL_14@gmail.com', 14, 4, 50000000,0);
  
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Hắc Diện','HCM','0999999999','EMAIL_15@gmail.com', 15, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Tang Đồ','HCM','0999999999','EMAIL_11@gmail.com', 16, 5, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Phan Phước Trí','HCM','0999999999','EMAIL_12@gmail.com', 17, 5, 50000000,0);
  
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Nguyễn Duy','HCM','0999999999','EMAIL_13@gmail.com', 18, 6, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Phan Thị Nghĩa','HCM','0999999999','EMAIL_14@gmail.com', 19, 6, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Trang Sĩ Dũ','HCM','0999999999','EMAIL_15@gmail.com', 20, 6, 50000000,0);
  
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Trần Nhật Anh','HCM','0999999999','EMAIL_11@gmail.com', 21, 7, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Hoàng Anh Thi Nguyễn','HCM','0999999999','EMAIL_12@gmail.com', 22, 7, 50000000,0);
  INSERT INTO NHANVIEN(HOTEN, DIACHI, DIENTHOAI, EMAIL, MAPHONG, CHINHANH, LUONG,CHUCVU) VALUES('Đồng Hữu Cơ','HCM','0999999999','EMAIL_13@gmail.com', 23, 7, 50000000,0);
  
  
  
  
  update nhanvien set chinhanh = 1 where manv = 10001;
  update nhanvien set chinhanh = 2 where manv = 10002;
  update nhanvien set chinhanh = 3 where manv = 10003;
  update nhanvien set chinhanh = 4 where manv = 10004;
  update nhanvien set chinhanh = 5 where manv = 10005;
  
  update chinhanh set truongchinhanh=10021 where truongchinhanh=10001;
  update chinhanh set truongchinhanh=10022 where truongchinhanh=10002;
  update chinhanh set truongchinhanh=10023 where truongchinhanh=10003;
  update chinhanh set truongchinhanh=10024 where truongchinhanh=10004;
  update chinhanh set truongchinhanh=10025 where truongchinhanh=10005;
  
  
  update nhanvien set chinhanh=2 where manv=10021;
  update nhanvien set chinhanh=3 where manv=10022;
  update nhanvien set chinhanh=4 where manv=10023;
  update nhanvien set chinhanh=5 where manv=10024;
  update nhanvien set chinhanh=6 where manv=10025;
  
  update phongban set truongphong=10027 where maphong=6;
  update phongban set truongphong=10028 where maphong=7;
  update phongban set truongphong=10029 where maphong=8;
  update phongban set truongphong=10030 where maphong=9;
  update phongban set truongphong=10031 where maphong=10;
  update phongban set truongphong=10032 where maphong=11;
  update phongban set truongphong=10033 where maphong=12;
  update phongban set truongphong=10034 where maphong=13;
  update phongban set truongphong=10035 where maphong=14;
  update phongban set truongphong=10036 where maphong=15;
  update phongban set truongphong=10037 where maphong=16;
  update phongban set truongphong=10038 where maphong=17;
  update phongban set truongphong=10039 where maphong=18;
  update phongban set truongphong=10040 where maphong=19;
  update phongban set truongphong=10041 where maphong=20;
  update phongban set truongphong=10042 where maphong=21;
  update phongban set truongphong=10043 where maphong=22;
  update phongban set truongphong=10044 where maphong=23;
  
  INSERT INTO CHINHANH(TENCN,TRUONGCHINHANH) VALUES ('TPHCM',10000);
  INSERT INTO CHINHANH(TENCN,TRUONGCHINHANH) VALUES ('Hà Nội',10001);
  INSERT INTO CHINHANH(TENCN,TRUONGCHINHANH) VALUES ('Đà Nẵng',10002);
  INSERT INTO CHINHANH(TENCN,TRUONGCHINHANH) VALUES ('Vũng Tàu',10003);
  INSERT INTO CHINHANH(TENCN,TRUONGCHINHANH) VALUES ('Đồng Nai',10004);
  INSERT INTO CHINHANH(TENCN,TRUONGCHINHANH) VALUES ('Seoul',10005);
  INSERT INTO CHINHANH(TENCN,TRUONGCHINHANH) VALUES ('Hong Kong',10006);
  INSERT INTO CHINHANH(TENCN,TRUONGCHINHANH) VALUES ('Tổng CT',10000);
  
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Giám đốc',10002,TO_DATE('2017/01/01','yyyy/mm/dd'),1,1);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Nhân sự',10002,TO_DATE('2017/01/01','yyyy/mm/dd'),1,2);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế toán',10002,TO_DATE('2017/01/01','yyyy/mm/dd'),1,3);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế hoạch',10002,TO_DATE('2017/01/01','yyyy/mm/dd'),1,4);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Nghiên cứu',10002,TO_DATE('2017/01/01','yyyy/mm/dd'),1,5);
  
  
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Nhân sự',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,2);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế toán',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,2);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế hoạch',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,2);
  
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Nhân sự',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,3);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế toán',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,3);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế hoạch',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,3);
  
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Nhân sự',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,4);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế toán',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,4);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế hoạch',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,4);
  
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Nhân sự',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,5);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế toán',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,5);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế hoạch',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,5);
  
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Nhân sự',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,6);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế toán',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,6);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế hoạch',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,6);
  
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Nhân sự',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,7);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế toán',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,7);
  INSERT INTO PHONGBAN(TENPHONG,TRUONGPHONG,NGAYNHANCHUC,SONHANVIEN,CHINHANH) VALUES ('Kế hoạch',10000,TO_DATE('2017/01/01','yyyy/mm/dd'),1,7);
  
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('Tạo đột biến gen ở loài vịt',9999999,1,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('Tạo đột biến gen ở loài chó',9942399,2,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('Tạo đột biến gen ở loài khỉ',999929,3,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('Tạo đột biến gen ở loài dơi',99912319,4,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('Kết hợp gen của người và alien',9945649,5,10002);
  
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH HN',9942399,8,10002);
  
  
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH DN',999929,9,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH DN',99912319,10,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH DN',9945649,11,10002);
  
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH VT',999929,12,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH VT',99912319,13,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH VT',9945649,14,10002);
  
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH DNG',999929,15,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH DNG',99912319,16,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH DNG',9945649,17,10002);
  
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH SEO',999929,18,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH SEO',99912319,19,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH SEO',9945649,20,10002);
  
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH HK',999929,21,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH HK',99912319,22,10002);
  INSERT INTO DUAN(TENDA,KINHPHI,PHONGCHUTRI,TRUONGDA) VALUES ('DA Phong KH HK',9945649,23,10002);
  
  update duan set tenda = 'DA Phong NS HN' where mada = 4;
  update duan set tenda = 'DA Phong KT HN' where mada = 5;
  
  update duan set phongchutri=6 where mada = 4;
  update duan set phongchutri=7 where mada = 5;
  update duan set phongchutri=4 where mada = 3;
  
  INSERT INTO PHANCONG(manv,duan,vaitro,phucap) values(10015,1,'Nghiên cứu sinh',1000000);
  INSERT INTO PHANCONG(manv,duan,vaitro,phucap) values(10016,2,'Giáo sư',5000000);
  INSERT INTO PHANCONG(manv,duan,vaitro,phucap) values(10017,3,'Tiến sĩ',01100000);
  INSERT INTO PHANCONG(manv,duan,vaitro,phucap) values(10018,4,'Trưởng dự án',8000000);
  INSERT INTO PHANCONG(manv,duan,vaitro,phucap) values(10019,5,'Phụ tá',900000);
  
  INSERT INTO CHITIEU(TENCHITIEU,SOTIEN,DUAN) VALUES('Top 1 thế giới',9999999999,1);
  INSERT INTO CHITIEU(TENCHITIEU,SOTIEN,DUAN) VALUES('Top 2 thế giới',5654646,2);
  INSERT INTO CHITIEU(TENCHITIEU,SOTIEN,DUAN) VALUES('Top 3 thế giới',543634564,3);
  INSERT INTO CHITIEU(TENCHITIEU,SOTIEN,DUAN) VALUES('Top 4 thế giới',45362345,4);
  INSERT INTO CHITIEU(TENCHITIEU,SOTIEN,DUAN) VALUES('Top 5 thế giới',100098766,5);
  
  
  
  update phongban set truongphong = 10001 where maphong = 1;
  update phongban set truongphong = 10002 where maphong = 2;
  update phongban set truongphong = 10003 where maphong = 3;
  update phongban set truongphong = 10004 where maphong = 4;
  update phongban set truongphong = 10005 where maphong = 5;