{"id":11831,"date":"2016-08-11T10:45:02","date_gmt":"2016-08-11T13:45:02","guid":{"rendered":"http:\/\/orabr.com\/?p=11831"},"modified":"2017-01-19T16:03:24","modified_gmt":"2017-01-19T18:03:24","slug":"criacao-e-carga-tabelas-emp-oracle","status":"publish","type":"post","link":"https:\/\/orabr.virttus.com\/?p=11831","title":{"rendered":"Cria\u00e7\u00e3o e carga tabelas EMP&#8230; Oracle"},"content":{"rendered":"<p><HTML><HTML><\/p>\n<pre class=\"lang:plsql decode:true \">load_sample.sql\r\n\r\nPrint  Close\r\nThe source code for the load_sample.sql is:\r\n\r\nREM ********************************************************************\r\nREM Create the REGIONS table to hold region information for locations\r\nREM HR.LOCATIONS table has a foreign key to this table.\r\n       \r\nCREATE TABLE regions\r\n   ( region_id NUMBER \r\n   CONSTRAINT region_id_nn NOT NULL \r\n   , region_name VARCHAR2(25) \r\n   );\r\nCREATE UNIQUE INDEX reg_id_pk\r\n         ON regions (region_id);\r\nALTER TABLE regions\r\n         ADD ( CONSTRAINT reg_id_pk\r\n   PRIMARY KEY (region_id)\r\n   ) ;\r\nREM ********************************************************************\r\nREM Create the COUNTRIES table to hold country information for customers\r\nREM and company locations. \r\nREM OE.CUSTOMERS table and HR.LOCATIONS have a foreign key to this table.\r\n       \r\nCREATE TABLE countries \r\n   ( country_id CHAR(2) \r\n   CONSTRAINT country_id_nn NOT NULL \r\n   , country_name VARCHAR2(40) \r\n   , region_id NUMBER \r\n   , CONSTRAINT country_c_id_pk \r\n   PRIMARY KEY (country_id) \r\n   ) \r\n   ORGANIZATION INDEX; \r\nALTER TABLE countries\r\n         ADD ( CONSTRAINT countr_reg_fk\r\n   FOREIGN KEY (region_id)\r\n   REFERENCES regions(region_id) \r\n   ) ;\r\nREM ********************************************************************\r\nREM Create the LOCATIONS table to hold address information for company departments.\r\nREM HR.DEPARTMENTS has a foreign key to this table.\r\n       \r\nCREATE TABLE locations\r\n   ( location_id NUMBER(4)\r\n   , street_address VARCHAR2(40)\r\n   , postal_code VARCHAR2(12)\r\n   , city VARCHAR2(30)\r\n   CONSTRAINT loc_city_nn NOT NULL\r\n   , state_province VARCHAR2(25)\r\n   , country_id CHAR(2)\r\n   ) ;\r\nCREATE UNIQUE INDEX loc_id_pk\r\n         ON locations (location_id) ;\r\nALTER TABLE locations\r\n         ADD ( CONSTRAINT loc_id_pk\r\n   PRIMARY KEY (location_id)\r\n   , CONSTRAINT loc_c_id_fk\r\n   FOREIGN KEY (country_id)\r\n   REFERENCES countries(country_id) \r\n   ) ;\r\nRem Useful for any subsequent addition of rows to locations table\r\nRem Starts with 3300\r\nCREATE SEQUENCE locations_seq\r\n   START WITH 3300\r\n   INCREMENT BY 100\r\n   MAXVALUE 9900\r\n   NOCACHE\r\n   NOCYCLE;\r\nREM ********************************************************************\r\nREM Create the DEPARTMENTS table to hold company department information.\r\nREM HR.EMPLOYEES and HR.JOB_HISTORY have a foreign key to this table.\r\n       \r\nCREATE TABLE departments\r\n   ( department_id NUMBER(4)\r\n   , department_name VARCHAR2(30)\r\n   CONSTRAINT dept_name_nn NOT NULL\r\n   , manager_id NUMBER(6)\r\n   , location_id NUMBER(4)\r\n   ) ;\r\nCREATE UNIQUE INDEX dept_id_pk\r\n         ON departments (department_id) ;\r\nALTER TABLE departments\r\n         ADD ( CONSTRAINT dept_id_pk\r\n   PRIMARY KEY (department_id)\r\n   , CONSTRAINT dept_loc_fk\r\n   FOREIGN KEY (location_id)\r\n   REFERENCES locations (location_id)\r\n   ) ;\r\nRem Useful for any subsequent addition of rows to departments table\r\nRem Starts with 280 \r\nCREATE SEQUENCE departments_seq\r\n   START WITH 280\r\n   INCREMENT BY 10\r\n   MAXVALUE 9990\r\n   NOCACHE\r\n   NOCYCLE;\r\nREM ********************************************************************\r\nREM Create the JOBS table to hold the different names of job roles within the company.\r\nREM HR.EMPLOYEES has a foreign key to this table.\r\n       \r\nCREATE TABLE jobs\r\n   ( job_id VARCHAR2(10)\r\n   , job_title VARCHAR2(35)\r\n   CONSTRAINT job_title_nn NOT NULL\r\n   , min_salary NUMBER(6)\r\n   , max_salary NUMBER(6)\r\n   ) ;\r\nCREATE UNIQUE INDEX job_id_pk \r\n         ON jobs (job_id) ;\r\nALTER TABLE jobs\r\n         ADD ( CONSTRAINT job_id_pk\r\n   PRIMARY KEY(job_id)\r\n   ) ;\r\nREM ********************************************************************\r\nREM Create the EMPLOYEES table to hold the employee personnel \r\nREM information for the company.\r\nREM HR.EMPLOYEES has a self referencing foreign key to this table.\r\n       \r\nCREATE TABLE employees\r\n   ( employee_id NUMBER(6)\r\n   , first_name VARCHAR2(20)\r\n   , last_name VARCHAR2(25)\r\n   CONSTRAINT emp_last_name_nn NOT NULL\r\n   , email VARCHAR2(25)\r\n   CONSTRAINT emp_email_nn NOT NULL\r\n   , phone_number VARCHAR2(20)\r\n   , hire_date DATE\r\n   CONSTRAINT emp_hire_date_nn NOT NULL\r\n   , job_id VARCHAR2(10)\r\n   CONSTRAINT emp_job_nn NOT NULL\r\n   , salary NUMBER(8,2)\r\n   , commission_pct NUMBER(2,2)\r\n   , manager_id NUMBER(6)\r\n   , department_id NUMBER(4)\r\n   , CONSTRAINT emp_salary_min\r\n   CHECK (salary &gt; 0) \r\n   , CONSTRAINT emp_email_uk\r\n   UNIQUE (email)\r\n   ) ;\r\nCREATE UNIQUE INDEX emp_emp_id_pk\r\n         ON employees (employee_id) ;\r\n       \r\nALTER TABLE employees\r\n         ADD ( CONSTRAINT emp_emp_id_pk\r\n   PRIMARY KEY (employee_id)\r\n   , CONSTRAINT emp_dept_fk\r\n   FOREIGN KEY (department_id)\r\n   REFERENCES departments\r\n   , CONSTRAINT emp_job_fk\r\n   FOREIGN KEY (job_id)\r\n   REFERENCES jobs (job_id)\r\n   , CONSTRAINT emp_manager_fk\r\n   FOREIGN KEY (manager_id)\r\n   REFERENCES employees\r\n   ) ;\r\nALTER TABLE departments\r\n         ADD ( CONSTRAINT dept_mgr_fk\r\n   FOREIGN KEY (manager_id)\r\n   REFERENCES employees (employee_id)\r\n   ) ;\r\n       \r\nRem Useful for any subsequent addition of rows to employees table\r\nREM Starts with 207 \r\n       \r\nCREATE SEQUENCE employees_seq\r\n   START WITH 207\r\n   INCREMENT BY 1\r\n   NOCACHE\r\n   NOCYCLE;\r\nREM ********************************************************************\r\nREM Create the JOB_HISTORY table to hold the history of jobs that \r\nREM employees have held in the past.\r\nREM HR.JOBS, HR_DEPARTMENTS, and HR.EMPLOYEES have a foreign key to this table.\r\n       \r\nCREATE TABLE job_history\r\n   ( employee_id NUMBER(6)\r\n   CONSTRAINT jhist_employee_nn NOT NULL\r\n   , start_date DATE\r\n   CONSTRAINT jhist_start_date_nn NOT NULL\r\n   , end_date DATE\r\n   CONSTRAINT jhist_end_date_nn NOT NULL\r\n   , job_id VARCHAR2(10)\r\n   CONSTRAINT jhist_job_nn NOT NULL\r\n   , department_id NUMBER(4)\r\n   , CONSTRAINT jhist_date_interval\r\n   CHECK (end_date &gt; start_date)\r\n   ) ;\r\nCREATE UNIQUE INDEX jhist_emp_id_st_date_pk \r\n         ON job_history (employee_id, start_date) ;\r\nALTER TABLE job_history\r\n         ADD ( CONSTRAINT jhist_emp_id_st_date_pk\r\n   PRIMARY KEY (employee_id, start_date)\r\n   , CONSTRAINT jhist_job_fk\r\n   FOREIGN KEY (job_id)\r\n   REFERENCES jobs\r\n   , CONSTRAINT jhist_emp_fk\r\n   FOREIGN KEY (employee_id)\r\n   REFERENCES employees\r\n   , CONSTRAINT jhist_dept_fk\r\n   FOREIGN KEY (department_id)\r\n   REFERENCES departments\r\n   ) ;\r\nREM ********************************************************************\r\nREM Create the EMP_DETAILS_VIEW that joins the employees, jobs, \r\nREM departments, jobs, countries, and locations table to provide details\r\nREM about employees.\r\n       \r\nCREATE OR REPLACE VIEW emp_details_view\r\n   (employee_id,\r\n   job_id,\r\n   manager_id,\r\n   department_id,\r\n   location_id,\r\n   country_id,\r\n   first_name,\r\n   last_name,\r\n   salary,\r\n   commission_pct,\r\n   department_name,\r\n   job_title,\r\n   city,\r\n   state_province,\r\n   country_name,\r\n   region_name)\r\n   AS SELECT\r\n   e.employee_id, \r\n   e.job_id, \r\n   e.manager_id, \r\n   e.department_id,\r\n   d.location_id,\r\n   l.country_id,\r\n   e.first_name,\r\n   e.last_name,\r\n   e.salary,\r\n   e.commission_pct,\r\n   d.department_name,\r\n   j.job_title,\r\n   l.city,\r\n   l.state_province,\r\n   c.country_name,\r\n   r.region_name\r\n   FROM\r\n   employees e,\r\n   departments d,\r\n   jobs j,\r\n   locations l,\r\n   countries c,\r\n   regions r\r\n   WHERE e.department_id = d.department_id\r\n   AND d.location_id = l.location_id\r\n   AND l.country_id = c.country_id\r\n   AND c.region_id = r.region_id\r\n   AND j.job_id = e.job_id \r\n   WITH READ ONLY;\r\n \r\nCOMMIT;\r\nALTER SESSION SET NLS_LANGUAGE=American; \r\nREM ***************************insert data into the REGIONS table\r\nINSERT INTO regions VALUES \r\n   ( 1\r\n   , 'Europe' \r\n   );\r\nINSERT INTO regions VALUES \r\n   ( 2\r\n   , 'Americas' \r\n   );\r\nINSERT INTO regions VALUES \r\n   ( 3\r\n   , 'Asia' \r\n   );\r\nINSERT INTO regions VALUES \r\n   ( 4\r\n   , 'Middle East and Africa' \r\n   );\r\nREM ***************************insert data into the COUNTRIES table\r\nINSERT INTO countries VALUES \r\n   ( 'IT'\r\n   , 'Italy'\r\n   , 1 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'JP'\r\n   , 'Japan'\r\n   , 3 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'US'\r\n   , 'United States of America'\r\n   , 2 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'CA'\r\n   , 'Canada'\r\n   , 2 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'CN'\r\n   , 'China'\r\n   , 3 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'IN'\r\n   , 'India'\r\n   , 3 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'AU'\r\n   , 'Australia'\r\n   , 3 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'ZW'\r\n   , 'Zimbabwe'\r\n   , 4 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'SG'\r\n   , 'Singapore'\r\n   , 3 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'UK'\r\n   , 'United Kingdom'\r\n   , 1 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'FR'\r\n   , 'France'\r\n   , 1 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'DE'\r\n   , 'Germany'\r\n   , 1 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'ZM'\r\n   , 'Zambia'\r\n   , 4 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'EG'\r\n   , 'Egypt'\r\n   , 4 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'BR'\r\n   , 'Brazil'\r\n   , 2 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'CH'\r\n   , 'Switzerland'\r\n   , 1 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'NL'\r\n   , 'Netherlands'\r\n   , 1 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'MX'\r\n   , 'Mexico'\r\n   , 2 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'KW'\r\n   , 'Kuwait'\r\n   , 4 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'IL'\r\n   , 'Israel'\r\n   , 4 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'DK'\r\n   , 'Denmark'\r\n   , 1 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'HK'\r\n   , 'HongKong'\r\n   , 3 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'NG'\r\n   , 'Nigeria'\r\n   , 4 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'AR'\r\n   , 'Argentina'\r\n   , 2 \r\n   );\r\nINSERT INTO countries VALUES \r\n   ( 'BE'\r\n   , 'Belgium'\r\n   , 1 \r\n   );\r\n       \r\nREM ***************************insert data into the LOCATIONS table       \r\nINSERT INTO locations VALUES \r\n   ( 1000 \r\n   , '1297 Via Cola di Rie'\r\n   , '00989'\r\n   , 'Roma'\r\n   , NULL\r\n   , 'IT'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 1100 \r\n   , '93091 Calle della Testa'\r\n   , '10934'\r\n   , 'Venice'\r\n   , NULL\r\n   , 'IT'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 1200 \r\n   , '2017 Shinjuku-ku'\r\n   , '1689'\r\n   , 'Tokyo'\r\n   , 'Tokyo Prefecture'\r\n   , 'JP'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 1300 \r\n   , '9450 Kamiya-cho'\r\n   , '6823'\r\n   , 'Hiroshima'\r\n   , NULL\r\n   , 'JP'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 1400 \r\n   , '2014 Jabberwocky Rd'\r\n   , '26192'\r\n   , 'Southlake'\r\n   , 'Texas'\r\n   , 'US'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 1500 \r\n   , '2011 Interiors Blvd'\r\n   , '99236'\r\n   , 'South San Francisco'\r\n   , 'California'\r\n   , 'US'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 1600 \r\n   , '2007 Zagora St'\r\n   , '50090'\r\n   , 'South Brunswick'\r\n   , 'New Jersey'\r\n   , 'US'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 1700 \r\n   , '2004 Charade Rd'\r\n   , '98199'\r\n   , 'Seattle'\r\n   , 'Washington'\r\n   , 'US'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 1800 \r\n   , '147 Spadina Ave'\r\n   , 'M5V 2L7'\r\n   , 'Toronto'\r\n   , 'Ontario'\r\n   , 'CA'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 1900 \r\n   , '6092 Boxwood St'\r\n   , 'YSW 9T2'\r\n   , 'Whitehorse'\r\n   , 'Yukon'\r\n   , 'CA'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2000 \r\n   , '40-5-12 Laogianggen'\r\n   , '190518'\r\n   , 'Beijing'\r\n   , NULL\r\n   , 'CN'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2100 \r\n   , '1298 Vileparle (E)'\r\n   , '490231'\r\n   , 'Bombay'\r\n   , 'Maharashtra'\r\n   , 'IN'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2200 \r\n   , '12-98 Victoria Street'\r\n   , '2901'\r\n   , 'Sydney'\r\n   , 'New South Wales'\r\n   , 'AU'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2300 \r\n   , '198 Clementi North'\r\n   , '540198'\r\n   , 'Singapore'\r\n   , NULL\r\n   , 'SG'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2400 \r\n   , '8204 Arthur St'\r\n   , NULL\r\n   , 'London'\r\n   , NULL\r\n   , 'UK'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2500 \r\n   , 'Magdalen Centre, The Oxford Science Park'\r\n   , 'OX9 9ZB'\r\n   , 'Oxford'\r\n   , 'Oxford'\r\n   , 'UK'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2600 \r\n   , '9702 Chester Road'\r\n   , '09629850293'\r\n   , 'Stretford'\r\n   , 'Manchester'\r\n   , 'UK'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2700 \r\n   , 'Schwanthalerstr. 7031'\r\n   , '80925'\r\n   , 'Munich'\r\n   , 'Bavaria'\r\n   , 'DE'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2800 \r\n   , 'Rua Frei Caneca 1360 '\r\n   , '01307-002'\r\n   , 'Sao Paulo'\r\n   , 'Sao Paulo'\r\n   , 'BR'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 2900 \r\n   , '20 Rue des Corps-Saints'\r\n   , '1730'\r\n   , 'Geneva'\r\n   , 'Geneve'\r\n   , 'CH'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 3000 \r\n   , 'Murtenstrasse 921'\r\n   , '3095'\r\n   , 'Bern'\r\n   , 'BE'\r\n   , 'CH'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 3100 \r\n   , 'Pieter Breughelstraat 837'\r\n   , '3029SK'\r\n   , 'Utrecht'\r\n   , 'Utrecht'\r\n   , 'NL'\r\n   );\r\nINSERT INTO locations VALUES \r\n   ( 3200 \r\n   , 'Mariano Escobedo 9991'\r\n   , '11932'\r\n   , 'Mexico City'\r\n   , 'Distrito Federal,'\r\n   , 'MX'\r\n   );\r\n       \r\nREM ****************************insert data into the DEPARTMENTS table\r\nREM disable integrity constraint to EMPLOYEES to load data\r\nALTER TABLE departments \r\n   DISABLE CONSTRAINT dept_mgr_fk;\r\nINSERT INTO departments VALUES \r\n   ( 10\r\n   , 'Administration'\r\n   , 200\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 20\r\n   , 'Marketing'\r\n   , 201\r\n   , 1800\r\n   );\r\n   \r\n   INSERT INTO departments VALUES \r\n   ( 30\r\n   , 'Purchasing'\r\n   , 114\r\n   , 1700\r\n   );\r\n   \r\n   INSERT INTO departments VALUES \r\n   ( 40\r\n   , 'Human Resources'\r\n   , 203\r\n   , 2400\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 50\r\n   , 'Shipping'\r\n   , 121\r\n   , 1500\r\n   );\r\n   \r\n   INSERT INTO departments VALUES \r\n   ( 60 \r\n   , 'IT'\r\n   , 103\r\n   , 1400\r\n   );\r\n   \r\n   INSERT INTO departments VALUES \r\n   ( 70 \r\n   , 'Public Relations'\r\n   , 204\r\n   , 2700\r\n   );\r\n   \r\n   INSERT INTO departments VALUES \r\n   ( 80 \r\n   , 'Sales'\r\n   , 145\r\n   , 2500\r\n   );\r\n   \r\n   INSERT INTO departments VALUES \r\n   ( 90 \r\n   , 'Executive'\r\n   , 100\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 100 \r\n   , 'Finance'\r\n   , 108\r\n   , 1700\r\n   );\r\n   \r\n   INSERT INTO departments VALUES \r\n   ( 110 \r\n   , 'Accounting'\r\n   , 205\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 120 \r\n   , 'Treasury'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 130 \r\n   , 'Corporate Tax'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 140 \r\n   , 'Control And Credit'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 150 \r\n   , 'Shareholder Services'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 160 \r\n   , 'Benefits'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 170 \r\n   , 'Manufacturing'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 180 \r\n   , 'Construction'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 190 \r\n   , 'Contracting'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 200 \r\n   , 'Operations'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 210 \r\n   , 'IT Support'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 220 \r\n   , 'NOC'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 230 \r\n   , 'IT Helpdesk'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 240 \r\n   , 'Government Sales'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 250 \r\n   , 'Retail Sales'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 260 \r\n   , 'Recruiting'\r\n   , NULL\r\n   , 1700\r\n   );\r\nINSERT INTO departments VALUES \r\n   ( 270 \r\n   , 'Payroll'\r\n   , NULL\r\n   , 1700\r\n   );\r\n       \r\nREM ***************************insert data into the JOBS table\r\nINSERT INTO jobs VALUES \r\n   ( 'AD_PRES'\r\n   , 'President'\r\n   , 20000\r\n   , 40000\r\n   );\r\n   INSERT INTO jobs VALUES \r\n   ( 'AD_VP'\r\n   , 'Administration Vice President'\r\n   , 15000\r\n   , 30000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'AD_ASST'\r\n   , 'Administration Assistant'\r\n   , 3000\r\n   , 6000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'FI_MGR'\r\n   , 'Finance Manager'\r\n   , 8200\r\n   , 16000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'FI_ACCOUNT'\r\n   , 'Accountant'\r\n   , 4200\r\n   , 9000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'AC_MGR'\r\n   , 'Accounting Manager'\r\n   , 8200\r\n   , 16000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'AC_ACCOUNT'\r\n   , 'Public Accountant'\r\n   , 4200\r\n   , 9000\r\n   );\r\n   INSERT INTO jobs VALUES \r\n   ( 'SA_MAN'\r\n   , 'Sales Manager'\r\n   , 10000\r\n   , 20000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'SA_REP'\r\n   , 'Sales Representative'\r\n   , 6000\r\n   , 12000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'PU_MAN'\r\n   , 'Purchasing Manager'\r\n   , 8000\r\n   , 15000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'PU_CLERK'\r\n   , 'Purchasing Clerk'\r\n   , 2500\r\n   , 5500\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'ST_MAN'\r\n   , 'Stock Manager'\r\n   , 5500\r\n   , 8500\r\n   );\r\n   INSERT INTO jobs VALUES \r\n   ( 'ST_CLERK'\r\n   , 'Stock Clerk'\r\n   , 2000\r\n   , 5000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'SH_CLERK'\r\n   , 'Shipping Clerk'\r\n   , 2500\r\n   , 5500\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'IT_PROG'\r\n   , 'Programmer'\r\n   , 4000\r\n   , 10000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'MK_MAN'\r\n   , 'Marketing Manager'\r\n   , 9000\r\n   , 15000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'MK_REP'\r\n   , 'Marketing Representative'\r\n   , 4000\r\n   , 9000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'HR_REP'\r\n   , 'Human Resources Representative'\r\n   , 4000\r\n   , 9000\r\n   );\r\nINSERT INTO jobs VALUES \r\n   ( 'PR_REP'\r\n   , 'Public Relations Representative'\r\n   , 4500\r\n   , 10500\r\n   );\r\n       \r\nREM ***************************insert data into the EMPLOYEES table\r\nINSERT INTO employees VALUES \r\n   ( 100\r\n   , 'Steven'\r\n   , 'King'\r\n   , 'SKING'\r\n   , '515.123.4567'\r\n   , TO_DATE('17-JUN-1987', 'dd-MON-yyyy')\r\n   , 'AD_PRES'\r\n   , 24000\r\n   , NULL\r\n   , NULL\r\n   , 90\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 101\r\n   , 'Neena'\r\n   , 'Kochhar'\r\n   , 'NKOCHHAR'\r\n   , '515.123.4568'\r\n   , TO_DATE('21-SEP-1989', 'dd-MON-yyyy')\r\n   , 'AD_VP'\r\n   , 17000\r\n   , NULL\r\n   , 100\r\n   , 90\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 102\r\n   , 'Lex'\r\n   , 'De Haan'\r\n   , 'LDEHAAN'\r\n   , '515.123.4569'\r\n   , TO_DATE('13-JAN-1993', 'dd-MON-yyyy')\r\n   , 'AD_VP'\r\n   , 17000\r\n   , NULL\r\n   , 100\r\n   , 90\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 103\r\n   , 'Alexander'\r\n   , 'Hunold'\r\n   , 'AHUNOLD'\r\n   , '590.423.4567'\r\n   , TO_DATE('03-JAN-1990', 'dd-MON-yyyy')\r\n   , 'IT_PROG'\r\n   , 9000\r\n   , NULL\r\n   , 102\r\n   , 60\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 104\r\n   , 'Bruce'\r\n   , 'Ernst'\r\n   , 'BERNST'\r\n   , '590.423.4568'\r\n   , TO_DATE('21-MAY-1991', 'dd-MON-yyyy')\r\n   , 'IT_PROG'\r\n   , 6000\r\n   , NULL\r\n   , 103\r\n   , 60\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 105\r\n   , 'David'\r\n   , 'Austin'\r\n   , 'DAUSTIN'\r\n   , '590.423.4569'\r\n   , TO_DATE('25-JUN-1997', 'dd-MON-yyyy')\r\n   , 'IT_PROG'\r\n   , 4800\r\n   , NULL\r\n   , 103\r\n   , 60\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 106\r\n   , 'Valli'\r\n   , 'Pataballa'\r\n   , 'VPATABAL'\r\n   , '590.423.4560'\r\n   , TO_DATE('05-FEB-1998', 'dd-MON-yyyy')\r\n   , 'IT_PROG'\r\n   , 4800\r\n   , NULL\r\n   , 103\r\n   , 60\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 107\r\n   , 'Diana'\r\n   , 'Lorentz'\r\n   , 'DLORENTZ'\r\n   , '590.423.5567'\r\n   , TO_DATE('07-FEB-1999', 'dd-MON-yyyy')\r\n   , 'IT_PROG'\r\n   , 4200\r\n   , NULL\r\n   , 103\r\n   , 60\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 108\r\n   , 'Nancy'\r\n   , 'Greenberg'\r\n   , 'NGREENBE'\r\n   , '515.124.4569'\r\n   , TO_DATE('17-AUG-1994', 'dd-MON-yyyy')\r\n   , 'FI_MGR'\r\n   , 12000\r\n   , NULL\r\n   , 101\r\n   , 100\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 109\r\n   , 'Daniel'\r\n   , 'Faviet'\r\n   , 'DFAVIET'\r\n   , '515.124.4169'\r\n   , TO_DATE('16-AUG-1994', 'dd-MON-yyyy')\r\n   , 'FI_ACCOUNT'\r\n   , 9000\r\n   , NULL\r\n   , 108\r\n   , 100\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 110\r\n   , 'John'\r\n   , 'Chen'\r\n   , 'JCHEN'\r\n   , '515.124.4269'\r\n   , TO_DATE('28-SEP-1997', 'dd-MON-yyyy')\r\n   , 'FI_ACCOUNT'\r\n   , 8200\r\n   , NULL\r\n   , 108\r\n   , 100\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 111\r\n   , 'Ismael'\r\n   , 'Sciarra'\r\n   , 'ISCIARRA'\r\n   , '515.124.4369'\r\n   , TO_DATE('30-SEP-1997', 'dd-MON-yyyy')\r\n   , 'FI_ACCOUNT'\r\n   , 7700\r\n   , NULL\r\n   , 108\r\n   , 100\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 112\r\n   , 'Jose Manuel'\r\n   , 'Urman'\r\n   , 'JMURMAN'\r\n   , '515.124.4469'\r\n   , TO_DATE('07-MAR-1998', 'dd-MON-yyyy')\r\n   , 'FI_ACCOUNT'\r\n   , 7800\r\n   , NULL\r\n   , 108\r\n   , 100\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 113\r\n   , 'Luis'\r\n   , 'Popp'\r\n   , 'LPOPP'\r\n   , '515.124.4567'\r\n   , TO_DATE('07-DEC-1999', 'dd-MON-yyyy')\r\n   , 'FI_ACCOUNT'\r\n   , 6900\r\n   , NULL\r\n   , 108\r\n   , 100\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 114\r\n   , 'Den'\r\n   , 'Raphaely'\r\n   , 'DRAPHEAL'\r\n   , '515.127.4561'\r\n   , TO_DATE('07-DEC-1994', 'dd-MON-yyyy')\r\n   , 'PU_MAN'\r\n   , 11000\r\n   , NULL\r\n   , 100\r\n   , 30\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 115\r\n   , 'Alexander'\r\n   , 'Khoo'\r\n   , 'AKHOO'\r\n   , '515.127.4562'\r\n   , TO_DATE('18-MAY-1995', 'dd-MON-yyyy')\r\n   , 'PU_CLERK'\r\n   , 3100\r\n   , NULL\r\n   , 114\r\n   , 30\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 116\r\n   , 'Shelli'\r\n   , 'Baida'\r\n   , 'SBAIDA'\r\n   , '515.127.4563'\r\n   , TO_DATE('24-DEC-1997', 'dd-MON-yyyy')\r\n   , 'PU_CLERK'\r\n   , 2900\r\n   , NULL\r\n   , 114\r\n   , 30\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 117\r\n   , 'Sigal'\r\n   , 'Tobias'\r\n   , 'STOBIAS'\r\n   , '515.127.4564'\r\n   , TO_DATE('24-JUL-1997', 'dd-MON-yyyy')\r\n   , 'PU_CLERK'\r\n   , 2800\r\n   , NULL\r\n   , 114\r\n   , 30\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 118\r\n   , 'Guy'\r\n   , 'Himuro'\r\n   , 'GHIMURO'\r\n   , '515.127.4565'\r\n   , TO_DATE('15-NOV-1998', 'dd-MON-yyyy')\r\n   , 'PU_CLERK'\r\n   , 2600\r\n   , NULL\r\n   , 114\r\n   , 30\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 119\r\n   , 'Karen'\r\n   , 'Colmenares'\r\n   , 'KCOLMENA'\r\n   , '515.127.4566'\r\n   , TO_DATE('10-AUG-1999', 'dd-MON-yyyy')\r\n   , 'PU_CLERK'\r\n   , 2500\r\n   , NULL\r\n   , 114\r\n   , 30\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 120\r\n   , 'Matthew'\r\n   , 'Weiss'\r\n   , 'MWEISS'\r\n   , '650.123.1234'\r\n   , TO_DATE('18-JUL-1996', 'dd-MON-yyyy')\r\n   , 'ST_MAN'\r\n   , 8000\r\n   , NULL\r\n   , 100\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 121\r\n   , 'Adam'\r\n   , 'Fripp'\r\n   , 'AFRIPP'\r\n   , '650.123.2234'\r\n   , TO_DATE('10-APR-1997', 'dd-MON-yyyy')\r\n   , 'ST_MAN'\r\n   , 8200\r\n   , NULL\r\n   , 100\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 122\r\n   , 'Payam'\r\n   , 'Kaufling'\r\n   , 'PKAUFLIN'\r\n   , '650.123.3234'\r\n   , TO_DATE('01-MAY-1995', 'dd-MON-yyyy')\r\n   , 'ST_MAN'\r\n   , 7900\r\n   , NULL\r\n   , 100\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 123\r\n   , 'Shanta'\r\n   , 'Vollman'\r\n   , 'SVOLLMAN'\r\n   , '650.123.4234'\r\n   , TO_DATE('10-OCT-1997', 'dd-MON-yyyy')\r\n   , 'ST_MAN'\r\n   , 6500\r\n   , NULL\r\n   , 100\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 124\r\n   , 'Kevin'\r\n   , 'Mourgos'\r\n   , 'KMOURGOS'\r\n   , '650.123.5234'\r\n   , TO_DATE('16-NOV-1999', 'dd-MON-yyyy')\r\n   , 'ST_MAN'\r\n   , 5800\r\n   , NULL\r\n   , 100\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 125\r\n   , 'Julia'\r\n   , 'Nayer'\r\n   , 'JNAYER'\r\n   , '650.124.1214'\r\n   , TO_DATE('16-JUL-1997', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 3200\r\n   , NULL\r\n   , 120\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 126\r\n   , 'Irene'\r\n   , 'Mikkilineni'\r\n   , 'IMIKKILI'\r\n   , '650.124.1224'\r\n   , TO_DATE('28-SEP-1998', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2700\r\n   , NULL\r\n   , 120\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 127\r\n   , 'James'\r\n   , 'Landry'\r\n   , 'JLANDRY'\r\n   , '650.124.1334'\r\n   , TO_DATE('14-JAN-1999', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2400\r\n   , NULL\r\n   , 120\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 128\r\n   , 'Steven'\r\n   , 'Markle'\r\n   , 'SMARKLE'\r\n   , '650.124.1434'\r\n   , TO_DATE('08-MAR-2000', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2200\r\n   , NULL\r\n   , 120\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 129\r\n   , 'Laura'\r\n   , 'Bissot'\r\n   , 'LBISSOT'\r\n   , '650.124.5234'\r\n   , TO_DATE('20-AUG-1997', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 3300\r\n   , NULL\r\n   , 121\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 130\r\n   , 'Mozhe'\r\n   , 'Atkinson'\r\n   , 'MATKINSO'\r\n   , '650.124.6234'\r\n   , TO_DATE('30-OCT-1997', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2800\r\n   , NULL\r\n   , 121\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 131\r\n   , 'James'\r\n   , 'Marlow'\r\n   , 'JAMRLOW'\r\n   , '650.124.7234'\r\n   , TO_DATE('16-FEB-1997', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2500\r\n   , NULL\r\n   , 121\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 132\r\n   , 'TJ'\r\n   , 'Olson'\r\n   , 'TJOLSON'\r\n   , '650.124.8234'\r\n   , TO_DATE('10-APR-1999', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2100\r\n   , NULL\r\n   , 121\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 133\r\n   , 'Jason'\r\n   , 'Mallin'\r\n   , 'JMALLIN'\r\n   , '650.127.1934'\r\n   , TO_DATE('14-JUN-1996', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 3300\r\n   , NULL\r\n   , 122\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 134\r\n   , 'Michael'\r\n   , 'Rogers'\r\n   , 'MROGERS'\r\n   , '650.127.1834'\r\n   , TO_DATE('26-AUG-1998', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2900\r\n   , NULL\r\n   , 122\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 135\r\n   , 'Ki'\r\n   , 'Gee'\r\n   , 'KGEE'\r\n   , '650.127.1734'\r\n   , TO_DATE('12-DEC-1999', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2400\r\n   , NULL\r\n   , 122\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 136\r\n   , 'Hazel'\r\n   , 'Philtanker'\r\n   , 'HPHILTAN'\r\n   , '650.127.1634'\r\n   , TO_DATE('06-FEB-2000', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2200\r\n   , NULL\r\n   , 122\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 137\r\n   , 'Renske'\r\n   , 'Ladwig'\r\n   , 'RLADWIG'\r\n   , '650.121.1234'\r\n   , TO_DATE('14-JUL-1995', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 3600\r\n   , NULL\r\n   , 123\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 138\r\n   , 'Stephen'\r\n   , 'Stiles'\r\n   , 'SSTILES'\r\n   , '650.121.2034'\r\n   , TO_DATE('26-OCT-1997', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 3200\r\n   , NULL\r\n   , 123\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 139\r\n   , 'John'\r\n   , 'Seo'\r\n   , 'JSEO'\r\n   , '650.121.2019'\r\n   , TO_DATE('12-FEB-1998', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2700\r\n   , NULL\r\n   , 123\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 140\r\n   , 'Joshua'\r\n   , 'Patel'\r\n   , 'JPATEL'\r\n   , '650.121.1834'\r\n   , TO_DATE('06-APR-1998', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2500\r\n   , NULL\r\n   , 123\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 141\r\n   , 'Trenna'\r\n   , 'Rajs'\r\n   , 'TRAJS'\r\n   , '650.121.8009'\r\n   , TO_DATE('17-OCT-1995', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 3500\r\n   , NULL\r\n   , 124\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 142\r\n   , 'Curtis'\r\n   , 'Davies'\r\n   , 'CDAVIES'\r\n   , '650.121.2994'\r\n   , TO_DATE('29-JAN-1997', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 3100\r\n   , NULL\r\n   , 124\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 143\r\n   , 'Randall'\r\n   , 'Matos'\r\n   , 'RMATOS'\r\n   , '650.121.2874'\r\n   , TO_DATE('15-MAR-1998', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2600\r\n   , NULL\r\n   , 124\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 144\r\n   , 'Peter'\r\n   , 'Vargas'\r\n   , 'PVARGAS'\r\n   , '650.121.2004'\r\n   , TO_DATE('09-JUL-1998', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 2500\r\n   , NULL\r\n   , 124\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 145\r\n   , 'John'\r\n   , 'Russell'\r\n   , 'JRUSSEL'\r\n   , '011.44.1344.429268'\r\n   , TO_DATE('01-OCT-1996', 'dd-MON-yyyy')\r\n   , 'SA_MAN'\r\n   , 14000\r\n   , .4\r\n   , 100\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 146\r\n   , 'Karen'\r\n   , 'Partners'\r\n   , 'KPARTNER'\r\n   , '011.44.1344.467268'\r\n   , TO_DATE('05-JAN-1997', 'dd-MON-yyyy')\r\n   , 'SA_MAN'\r\n   , 13500\r\n   , .3\r\n   , 100\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 147\r\n   , 'Alberto'\r\n   , 'Errazuriz'\r\n   , 'AERRAZUR'\r\n   , '011.44.1344.429278'\r\n   , TO_DATE('10-MAR-1997', 'dd-MON-yyyy')\r\n   , 'SA_MAN'\r\n   , 12000\r\n   , .3\r\n   , 100\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 148\r\n   , 'Gerald'\r\n   , 'Cambrault'\r\n   , 'GCAMBRAU'\r\n   , '011.44.1344.619268'\r\n   , TO_DATE('15-OCT-1999', 'dd-MON-yyyy')\r\n   , 'SA_MAN'\r\n   , 11000\r\n   , .3\r\n   , 100\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 149\r\n   , 'Eleni'\r\n   , 'Zlotkey'\r\n   , 'EZLOTKEY'\r\n   , '011.44.1344.429018'\r\n   , TO_DATE('29-JAN-2000', 'dd-MON-yyyy')\r\n   , 'SA_MAN'\r\n   , 10500\r\n   , .2\r\n   , 100\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 150\r\n   , 'Peter'\r\n   , 'Tucker'\r\n   , 'PTUCKER'\r\n   , '011.44.1344.129268'\r\n   , TO_DATE('30-JAN-1997', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 10000\r\n   , .3\r\n   , 145\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 151\r\n   , 'David'\r\n   , 'Bernstein'\r\n   , 'DBERNSTE'\r\n   , '011.44.1344.345268'\r\n   , TO_DATE('24-MAR-1997', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 9500\r\n   , .25\r\n   , 145\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 152\r\n   , 'Peter'\r\n   , 'Hall'\r\n   , 'PHALL'\r\n   , '011.44.1344.478968'\r\n   , TO_DATE('20-AUG-1997', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 9000\r\n   , .25\r\n   , 145\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 153\r\n   , 'Christopher'\r\n   , 'Olsen'\r\n   , 'COLSEN'\r\n   , '011.44.1344.498718'\r\n   , TO_DATE('30-MAR-1998', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 8000\r\n   , .2\r\n   , 145\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 154\r\n   , 'Nanette'\r\n   , 'Cambrault'\r\n   , 'NCAMBRAU'\r\n   , '011.44.1344.987668'\r\n   , TO_DATE('09-DEC-1998', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 7500\r\n   , .2\r\n   , 145\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 155\r\n   , 'Oliver'\r\n   , 'Tuvault'\r\n   , 'OTUVAULT'\r\n   , '011.44.1344.486508'\r\n   , TO_DATE('23-NOV-1999', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 7000\r\n   , .15\r\n   , 145\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 156\r\n   , 'Janette'\r\n   , 'King'\r\n   , 'JKING'\r\n   , '011.44.1345.429268'\r\n   , TO_DATE('30-JAN-1996', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 10000\r\n   , .35\r\n   , 146\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 157\r\n   , 'Patrick'\r\n   , 'Sully'\r\n   , 'PSULLY'\r\n   , '011.44.1345.929268'\r\n   , TO_DATE('04-MAR-1996', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 9500\r\n   , .35\r\n   , 146\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 158\r\n   , 'Allan'\r\n   , 'McEwen'\r\n   , 'AMCEWEN'\r\n   , '011.44.1345.829268'\r\n   , TO_DATE('01-AUG-1996', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 9000\r\n   , .35\r\n   , 146\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 159\r\n   , 'Lindsey'\r\n   , 'Smith'\r\n   , 'LSMITH'\r\n   , '011.44.1345.729268'\r\n   , TO_DATE('10-MAR-1997', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 8000\r\n   , .3\r\n   , 146\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 160\r\n   , 'Louise'\r\n   , 'Doran'\r\n   , 'LDORAN'\r\n   , '011.44.1345.629268'\r\n   , TO_DATE('15-DEC-1997', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 7500\r\n   , .3\r\n   , 146\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 161\r\n   , 'Sarath'\r\n   , 'Sewall'\r\n   , 'SSEWALL'\r\n   , '011.44.1345.529268'\r\n   , TO_DATE('03-NOV-1998', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 7000\r\n   , .25\r\n   , 146\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 162\r\n   , 'Clara'\r\n   , 'Vishney'\r\n   , 'CVISHNEY'\r\n   , '011.44.1346.129268'\r\n   , TO_DATE('11-NOV-1997', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 10500\r\n   , .25\r\n   , 147\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 163\r\n   , 'Danielle'\r\n   , 'Greene'\r\n   , 'DGREENE'\r\n   , '011.44.1346.229268'\r\n   , TO_DATE('19-MAR-1999', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 9500\r\n   , .15\r\n   , 147\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 164\r\n   , 'Mattea'\r\n   , 'Marvins'\r\n   , 'MMARVINS'\r\n   , '011.44.1346.329268'\r\n   , TO_DATE('24-JAN-2000', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 7200\r\n   , .10\r\n   , 147\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 165\r\n   , 'David'\r\n   , 'Lee'\r\n   , 'DLEE'\r\n   , '011.44.1346.529268'\r\n   , TO_DATE('23-FEB-2000', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 6800\r\n   , .1\r\n   , 147\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 166\r\n   , 'Sundar'\r\n   , 'Ande'\r\n   , 'SANDE'\r\n   , '011.44.1346.629268'\r\n   , TO_DATE('24-MAR-2000', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 6400\r\n   , .10\r\n   , 147\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 167\r\n   , 'Amit'\r\n   , 'Banda'\r\n   , 'ABANDA'\r\n   , '011.44.1346.729268'\r\n   , TO_DATE('21-APR-2000', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 6200\r\n   , .10\r\n   , 147\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 168\r\n   , 'Lisa'\r\n   , 'Ozer'\r\n   , 'LOZER'\r\n   , '011.44.1343.929268'\r\n   , TO_DATE('11-MAR-1997', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 11500\r\n   , .25\r\n   , 148\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 169 \r\n   , 'Harrison'\r\n   , 'Bloom'\r\n   , 'HBLOOM'\r\n   , '011.44.1343.829268'\r\n   , TO_DATE('23-MAR-1998', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 10000\r\n   , .20\r\n   , 148\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 170\r\n   , 'Tayler'\r\n   , 'Fox'\r\n   , 'TFOX'\r\n   , '011.44.1343.729268'\r\n   , TO_DATE('24-JAN-1998', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 9600\r\n   , .20\r\n   , 148\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 171\r\n   , 'William'\r\n   , 'Smith'\r\n   , 'WSMITH'\r\n   , '011.44.1343.629268'\r\n   , TO_DATE('23-FEB-1999', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 7400\r\n   , .15\r\n   , 148\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 172\r\n   , 'Elizabeth'\r\n   , 'Bates'\r\n   , 'EBATES'\r\n   , '011.44.1343.529268'\r\n   , TO_DATE('24-MAR-1999', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 7300\r\n   , .15\r\n   , 148\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 173\r\n   , 'Sundita'\r\n   , 'Kumar'\r\n   , 'SKUMAR'\r\n   , '011.44.1343.329268'\r\n   , TO_DATE('21-APR-2000', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 6100\r\n   , .10\r\n   , 148\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 174\r\n   , 'Ellen'\r\n   , 'Abel'\r\n   , 'EABEL'\r\n   , '011.44.1644.429267'\r\n   , TO_DATE('11-MAY-1996', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 11000\r\n   , .30\r\n   , 149\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 175\r\n   , 'Alyssa'\r\n   , 'Hutton'\r\n   , 'AHUTTON'\r\n   , '011.44.1644.429266'\r\n   , TO_DATE('19-MAR-1997', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 8800\r\n   , .25\r\n   , 149\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 176\r\n   , 'Jonathon'\r\n   , 'Taylor'\r\n   , 'JTAYLOR'\r\n   , '011.44.1644.429265'\r\n   , TO_DATE('24-MAR-1998', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 8600\r\n   , .20\r\n   , 149\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 177\r\n   , 'Jack'\r\n   , 'Livingston'\r\n   , 'JLIVINGS'\r\n   , '011.44.1644.429264'\r\n   , TO_DATE('23-APR-1998', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 8400\r\n   , .20\r\n   , 149\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 178\r\n   , 'Kimberely'\r\n   , 'Grant'\r\n   , 'KGRANT'\r\n   , '011.44.1644.429263'\r\n   , TO_DATE('24-MAY-1999', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 7000\r\n   , .15\r\n   , 149\r\n   , NULL\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 179\r\n   , 'Charles'\r\n   , 'Johnson'\r\n   , 'CJOHNSON'\r\n   , '011.44.1644.429262'\r\n   , TO_DATE('04-JAN-2000', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 6200\r\n   , .10\r\n   , 149\r\n   , 80\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 180\r\n   , 'Winston'\r\n   , 'Taylor'\r\n   , 'WTAYLOR'\r\n   , '650.507.9876'\r\n   , TO_DATE('24-JAN-1998', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3200\r\n   , NULL\r\n   , 120\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 181\r\n   , 'Jean'\r\n   , 'Fleaur'\r\n   , 'JFLEAUR'\r\n   , '650.507.9877'\r\n   , TO_DATE('23-FEB-1998', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3100\r\n   , NULL\r\n   , 120\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 182\r\n   , 'Martha'\r\n   , 'Sullivan'\r\n   , 'MSULLIVA'\r\n   , '650.507.9878'\r\n   , TO_DATE('21-JUN-1999', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 2500\r\n   , NULL\r\n   , 120\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 183\r\n   , 'Girard'\r\n   , 'Geoni'\r\n   , 'GGEONI'\r\n   , '650.507.9879'\r\n   , TO_DATE('03-FEB-2000', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 2800\r\n   , NULL\r\n   , 120\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 184\r\n   , 'Nandita'\r\n   , 'Sarchand'\r\n   , 'NSARCHAN'\r\n   , '650.509.1876'\r\n   , TO_DATE('27-JAN-1996', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 4200\r\n   , NULL\r\n   , 121\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 185\r\n   , 'Alexis'\r\n   , 'Bull'\r\n   , 'ABULL'\r\n   , '650.509.2876'\r\n   , TO_DATE('20-FEB-1997', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 4100\r\n   , NULL\r\n   , 121\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 186\r\n   , 'Julia'\r\n   , 'Dellinger'\r\n   , 'JDELLING'\r\n   , '650.509.3876'\r\n   , TO_DATE('24-JUN-1998', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3400\r\n   , NULL\r\n   , 121\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 187\r\n   , 'Anthony'\r\n   , 'Cabrio'\r\n   , 'ACABRIO'\r\n   , '650.509.4876'\r\n   , TO_DATE('07-FEB-1999', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3000\r\n   , NULL\r\n   , 121\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 188\r\n   , 'Kelly'\r\n   , 'Chung'\r\n   , 'KCHUNG'\r\n   , '650.505.1876'\r\n   , TO_DATE('14-JUN-1997', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3800\r\n   , NULL\r\n   , 122\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 189\r\n   , 'Jennifer'\r\n   , 'Dilly'\r\n   , 'JDILLY'\r\n   , '650.505.2876'\r\n   , TO_DATE('13-AUG-1997', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3600\r\n   , NULL\r\n   , 122\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 190\r\n   , 'Timothy'\r\n   , 'Gates'\r\n   , 'TGATES'\r\n   , '650.505.3876'\r\n   , TO_DATE('11-JUL-1998', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 2900\r\n   , NULL\r\n   , 122\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 191\r\n   , 'Randall'\r\n   , 'Perkins'\r\n   , 'RPERKINS'\r\n   , '650.505.4876'\r\n   , TO_DATE('19-DEC-1999', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 2500\r\n   , NULL\r\n   , 122\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 192\r\n   , 'Sarah'\r\n   , 'Bell'\r\n   , 'SBELL'\r\n   , '650.501.1876'\r\n   , TO_DATE('04-FEB-1996', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 4000\r\n   , NULL\r\n   , 123\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 193\r\n   , 'Britney'\r\n   , 'Everett'\r\n   , 'BEVERETT'\r\n   , '650.501.2876'\r\n   , TO_DATE('03-MAR-1997', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3900\r\n   , NULL\r\n   , 123\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 194\r\n   , 'Samuel'\r\n   , 'McCain'\r\n   , 'SMCCAIN'\r\n   , '650.501.3876'\r\n   , TO_DATE('01-JUL-1998', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3200\r\n   , NULL\r\n   , 123\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 195\r\n   , 'Vance'\r\n   , 'Jones'\r\n   , 'VJONES'\r\n   , '650.501.4876'\r\n   , TO_DATE('17-MAR-1999', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 2800\r\n   , NULL\r\n   , 123\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 196\r\n   , 'Alana'\r\n   , 'Walsh'\r\n   , 'AWALSH'\r\n   , '650.507.9811'\r\n   , TO_DATE('24-APR-1998', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3100\r\n   , NULL\r\n   , 124\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 197\r\n   , 'Kevin'\r\n   , 'Feeney'\r\n   , 'KFEENEY'\r\n   , '650.507.9822'\r\n   , TO_DATE('23-MAY-1998', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 3000\r\n   , NULL\r\n   , 124\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 198\r\n   , 'Donald'\r\n   , 'OConnell'\r\n   , 'DOCONNEL'\r\n   , '650.507.9833'\r\n   , TO_DATE('21-JUN-1999', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 2600\r\n   , NULL\r\n   , 124\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 199\r\n   , 'Douglas'\r\n   , 'Grant'\r\n   , 'DGRANT'\r\n   , '650.507.9844'\r\n   , TO_DATE('13-JAN-2000', 'dd-MON-yyyy')\r\n   , 'SH_CLERK'\r\n   , 2600\r\n   , NULL\r\n   , 124\r\n   , 50\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 200\r\n   , 'Jennifer'\r\n   , 'Whalen'\r\n   , 'JWHALEN'\r\n   , '515.123.4444'\r\n   , TO_DATE('17-SEP-1987', 'dd-MON-yyyy')\r\n   , 'AD_ASST'\r\n   , 4400\r\n   , NULL\r\n   , 101\r\n   , 10\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 201\r\n   , 'Michael'\r\n   , 'Hartstein'\r\n   , 'MHARTSTE'\r\n   , '515.123.5555'\r\n   , TO_DATE('17-FEB-1996', 'dd-MON-yyyy')\r\n   , 'MK_MAN'\r\n   , 13000\r\n   , NULL\r\n   , 100\r\n   , 20\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 202\r\n   , 'Pat'\r\n   , 'Fay'\r\n   , 'PFAY'\r\n   , '603.123.6666'\r\n   , TO_DATE('17-AUG-1997', 'dd-MON-yyyy')\r\n   , 'MK_REP'\r\n   , 6000\r\n   , NULL\r\n   , 201\r\n   , 20\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 203\r\n   , 'Susan'\r\n   , 'Mavris'\r\n   , 'SMAVRIS'\r\n   , '515.123.7777'\r\n   , TO_DATE('07-JUN-1994', 'dd-MON-yyyy')\r\n   , 'HR_REP'\r\n   , 6500\r\n   , NULL\r\n   , 101\r\n   , 40\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 204\r\n   , 'Hermann'\r\n   , 'Baer'\r\n   , 'HBAER'\r\n   , '515.123.8888'\r\n   , TO_DATE('07-JUN-1994', 'dd-MON-yyyy')\r\n   , 'PR_REP'\r\n   , 10000\r\n   , NULL\r\n   , 101\r\n   , 70\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 205\r\n   , 'Shelley'\r\n   , 'Higgins'\r\n   , 'SHIGGINS'\r\n   , '515.123.8080'\r\n   , TO_DATE('07-JUN-1994', 'dd-MON-yyyy')\r\n   , 'AC_MGR'\r\n   , 12000\r\n   , NULL\r\n   , 101\r\n   , 110\r\n   );\r\nINSERT INTO employees VALUES \r\n   ( 206\r\n   , 'William'\r\n   , 'Gietz'\r\n   , 'WGIETZ'\r\n   , '515.123.8181'\r\n   , TO_DATE('07-JUN-1994', 'dd-MON-yyyy')\r\n   , 'AC_ACCOUNT'\r\n   , 8300\r\n   , NULL\r\n   , 205\r\n   , 110\r\n   );\r\nREM ********* insert data into the JOB_HISTORY table\r\n       \r\nINSERT INTO job_history\r\n         VALUES (102\r\n   , TO_DATE('13-JAN-1993', 'dd-MON-yyyy')\r\n   , TO_DATE('24-JUL-1998', 'dd-MON-yyyy')\r\n   , 'IT_PROG'\r\n   , 60);\r\nINSERT INTO job_history\r\n         VALUES (101\r\n   , TO_DATE('21-SEP-1989', 'dd-MON-yyyy')\r\n   , TO_DATE('27-OCT-1993', 'dd-MON-yyyy')\r\n   , 'AC_ACCOUNT'\r\n   , 110);\r\nINSERT INTO job_history\r\n         VALUES (101\r\n   , TO_DATE('28-OCT-1993', 'dd-MON-yyyy')\r\n   , TO_DATE('15-MAR-1997', 'dd-MON-yyyy')\r\n   , 'AC_MGR'\r\n   , 110);\r\nINSERT INTO job_history\r\n         VALUES (201\r\n   , TO_DATE('17-FEB-1996', 'dd-MON-yyyy')\r\n   , TO_DATE('19-DEC-1999', 'dd-MON-yyyy')\r\n   , 'MK_REP'\r\n   , 20);\r\nINSERT INTO job_history\r\n         VALUES (114\r\n   , TO_DATE('24-MAR-1998', 'dd-MON-yyyy')\r\n   , TO_DATE('31-DEC-1999', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 50\r\n   );\r\nINSERT INTO job_history\r\n         VALUES (122\r\n   , TO_DATE('01-JAN-1999', 'dd-MON-yyyy')\r\n   , TO_DATE('31-DEC-1999', 'dd-MON-yyyy')\r\n   , 'ST_CLERK'\r\n   , 50\r\n   );\r\nINSERT INTO job_history\r\n         VALUES (200\r\n   , TO_DATE('17-SEP-1987', 'dd-MON-yyyy')\r\n   , TO_DATE('17-JUN-1993', 'dd-MON-yyyy')\r\n   , 'AD_ASST'\r\n   , 90\r\n   );\r\nINSERT INTO job_history\r\n         VALUES (176\r\n   , TO_DATE('24-MAR-1998', 'dd-MON-yyyy')\r\n   , TO_DATE('31-DEC-1998', 'dd-MON-yyyy')\r\n   , 'SA_REP'\r\n   , 80\r\n   );\r\nINSERT INTO job_history\r\n         VALUES (176\r\n   , TO_DATE('01-JAN-1999', 'dd-MON-yyyy')\r\n   , TO_DATE('31-DEC-1999', 'dd-MON-yyyy')\r\n   , 'SA_MAN'\r\n   , 80\r\n   );\r\nINSERT INTO job_history\r\n         VALUES (200\r\n   , TO_DATE('01-JUL-1994', 'dd-MON-yyyy')\r\n   , TO_DATE('31-DEC-1998', 'dd-MON-yyyy')\r\n   , 'AC_ACCOUNT'\r\n   , 90\r\n   );\r\nREM enable integrity constraint to DEPARTMENTS\r\nALTER TABLE departments \r\n   ENABLE CONSTRAINT dept_mgr_fk;\r\nCOMMIT;\r\nCREATE INDEX emp_department_ix\r\n   ON employees (department_id);\r\nCREATE INDEX emp_job_ix\r\n   ON employees (job_id);\r\nCREATE INDEX emp_manager_ix\r\n   ON employees (manager_id);\r\nCREATE INDEX emp_name_ix\r\n   ON employees (last_name, first_name);\r\nCREATE INDEX dept_location_ix\r\n   ON departments (location_id);\r\nCREATE INDEX jhist_job_ix\r\n   ON job_history (job_id);\r\nCREATE INDEX jhist_employee_ix\r\n   ON job_history (employee_id);\r\nCREATE INDEX jhist_department_ix\r\n   ON job_history (department_id);\r\nCREATE INDEX loc_city_ix\r\n   ON locations (city);\r\nCREATE INDEX loc_state_province_ix \r\n   ON locations (state_province);\r\nCREATE INDEX loc_country_ix\r\n   ON locations (country_id);\r\nCOMMIT;\r\nREM procedure and statement trigger to allow dmls during business hours:\r\n         CREATE OR REPLACE PROCEDURE secure_dml\r\n         IS\r\n         BEGIN\r\n   IF TO_CHAR (SYSDATE, 'HH24:MI') NOT BETWEEN '08:00' AND '18:00'\r\n   OR TO_CHAR (SYSDATE, 'DY') IN ('SAT', 'SUN') THEN\r\n   RAISE_APPLICATION_ERROR (-20205, \r\n   'You may only make changes during normal office hours');\r\n   END IF;\r\n   END secure_dml;\r\n   \/\r\nCREATE OR REPLACE TRIGGER secure_employees\r\n   BEFORE INSERT OR UPDATE OR DELETE ON employees\r\n   BEGIN\r\n   secure_dml;\r\n   END secure_employees;\r\n   \/\r\nALTER TRIGGER secure_employees DISABLE;\r\nREM **************************************************************************\r\nREM procedure to add a row to the JOB_HISTORY table and row trigger \r\nREM to call the procedure when data is updated in the job_id or \r\nREM department_id columns in the EMPLOYEES table:\r\nCREATE OR REPLACE PROCEDURE add_job_history\r\n   ( p_emp_id job_history.employee_id%type\r\n   , p_start_date job_history.start_date%type\r\n   , p_end_date job_history.end_date%type\r\n   , p_job_id job_history.job_id%type\r\n   , p_department_id job_history.department_id%type \r\n   )\r\n   IS\r\n   BEGIN\r\n   INSERT INTO job_history (employee_id, start_date, end_date, \r\n   job_id, department_id)\r\n   VALUES(p_emp_id, p_start_date, p_end_date, p_job_id, p_department_id);\r\n   END add_job_history;\r\n   \/\r\nCREATE OR REPLACE TRIGGER update_job_history\r\n   AFTER UPDATE OF job_id, department_id ON employees\r\n   FOR EACH ROW\r\n   BEGIN\r\n   add_job_history(:old.employee_id, :old.hire_date, sysdate, \r\n   :old.job_id, :old.department_id);\r\n   END;\r\n   \/\r\nCOMMIT;\r\nCOMMENT ON TABLE regions \r\n         IS 'Regions table that contains region numbers and names. Contains 4 rows; references with the Countries table.';\r\nCOMMENT ON COLUMN regions.region_id\r\n         IS 'Primary key of regions table.';\r\nCOMMENT ON COLUMN regions.region_name\r\n         IS 'Names of regions. Locations are in the countries of these regions.';\r\nCOMMENT ON TABLE locations\r\n         IS 'Locations table that contains specific address of a specific office,\r\n         warehouse, and\/or production site of a company. Does not store addresses \/\r\n         locations of customers. Contains 23 rows; references with the\r\n         departments and countries tables. ';\r\nCOMMENT ON COLUMN locations.location_id\r\n         IS 'Primary key of locations table';\r\nCOMMENT ON COLUMN locations.street_address\r\n         IS 'Street address of an office, warehouse, or production site of a company.\r\n         Contains building number and street name';\r\nCOMMENT ON COLUMN locations.postal_code\r\n         IS 'Postal code of the location of an office, warehouse, or production site \r\n         of a company. ';\r\nCOMMENT ON COLUMN locations.city\r\n         IS 'A not null column that shows city where an office, warehouse, or \r\n         production site of a company is located. ';\r\nCOMMENT ON COLUMN locations.state_province\r\n         IS 'State or Province where an office, warehouse, or production site of a \r\n         company is located.';\r\nCOMMENT ON COLUMN locations.country_id\r\n         IS 'Country where an office, warehouse, or production site of a company is\r\n         located. Foreign key to country_id column of the countries table.';\r\n       \r\nREM *********************************************\r\nCOMMENT ON TABLE departments\r\n         IS 'Departments table that shows details of departments where employees \r\n         work. Contains 27 rows; references with locations, employees, and job_history tables.';\r\nCOMMENT ON COLUMN departments.department_id\r\n         IS 'Primary key column of departments table.';\r\nCOMMENT ON COLUMN departments.department_name\r\n         IS 'A not null column that shows name of a department. Administration, \r\n         Marketing, Purchasing, Human Resources, Shipping, IT, Executive, Public \r\n         Relations, Sales, Finance, and Accounting. ';\r\nCOMMENT ON COLUMN departments.manager_id\r\n         IS 'Manager_id of a department. Foreign key to employee_id column of employees table. The manager_id column of the employee table references this column.';\r\nCOMMENT ON COLUMN departments.location_id\r\n         IS 'Location id where a department is located. Foreign key to location_id column of locations table.';\r\n       \r\nREM *********************************************\r\nCOMMENT ON TABLE job_history\r\n         IS 'Table that stores job history of the employees. If an employee \r\n         changes departments within the job or changes jobs within the department, \r\n         new rows get inserted into this table with old job information of the \r\n         employee. Contains a complex primary key: employee_id+start_date.\r\n         Contains 25 rows. References with jobs, employees, and departments tables.';\r\nCOMMENT ON COLUMN job_history.employee_id\r\n         IS 'A not null column in the complex primary key employee_id+start_date.\r\n         Foreign key to employee_id column of the employee table';\r\nCOMMENT ON COLUMN job_history.start_date\r\n         IS 'A not null column in the complex primary key employee_id+start_date. \r\n         Must be less than the end_date of the job_history table. (enforced by \r\n         constraint jhist_date_interval)';\r\nCOMMENT ON COLUMN job_history.end_date\r\n         IS 'Last day of the employee in this job role. A not null column. Must be \r\n         greater than the start_date of the job_history table. \r\n         (enforced by constraint jhist_date_interval)';\r\nCOMMENT ON COLUMN job_history.job_id\r\n         IS 'Job role in which the employee worked in the past; foreign key to \r\n         job_id column in the jobs table. A not null column.';\r\nCOMMENT ON COLUMN job_history.department_id\r\n         IS 'Department id in which the employee worked in the past; foreign key to deparment_id column in the departments table';\r\n       \r\nREM *********************************************\r\nCOMMENT ON TABLE countries\r\n         IS 'country table. Contains 25 rows. References with locations table.';\r\nCOMMENT ON COLUMN countries.country_id\r\n         IS 'Primary key of countries table.';\r\nCOMMENT ON COLUMN countries.country_name\r\n         IS 'Country name';\r\nCOMMENT ON COLUMN countries.region_id\r\n         IS 'Region ID for the country. Foreign key to region_id column in the departments table.';\r\nREM *********************************************\r\nCOMMENT ON TABLE jobs\r\n         IS 'jobs table with job titles and salary ranges. Contains 19 rows.\r\n         References with employees and job_history table.';\r\nCOMMENT ON COLUMN jobs.job_id\r\n         IS 'Primary key of jobs table.';\r\nCOMMENT ON COLUMN jobs.job_title\r\n         IS 'A not null column that shows job title, e.g. AD_VP, FI_ACCOUNTANT';\r\nCOMMENT ON COLUMN jobs.min_salary\r\n         IS 'Minimum salary for a job title.';\r\nCOMMENT ON COLUMN jobs.max_salary\r\n         IS 'Maximum salary for a job title';\r\nREM *********************************************\r\nCOMMENT ON TABLE employees\r\n         IS 'employees table. Contains 107 rows. References with departments, \r\n         jobs, job_history tables. Contains a self reference.';\r\nCOMMENT ON COLUMN employees.employee_id\r\n         IS 'Primary key of employees table.';\r\nCOMMENT ON COLUMN employees.first_name\r\n         IS 'First name of the employee. A not null column.';\r\nCOMMENT ON COLUMN employees.last_name\r\n         IS 'Last name of the employee. A not null column.';\r\nCOMMENT ON COLUMN employees.email\r\n         IS 'Email id of the employee';\r\nCOMMENT ON COLUMN employees.phone_number\r\n         IS 'Phone number of the employee; includes country code and area code';\r\nCOMMENT ON COLUMN employees.hire_date\r\n         IS 'Date when the employee started on this job. A not null column.';\r\nCOMMENT ON COLUMN employees.job_id\r\n         IS 'Current job of the employee; foreign key to job_id column of the \r\n         jobs table. A not null column.';\r\nCOMMENT ON COLUMN employees.salary\r\n         IS 'Monthly salary of the employee. Must be greater \r\n         than zero (enforced by constraint emp_salary_min)';\r\nCOMMENT ON COLUMN employees.commission_pct\r\n         IS 'Commission percentage of the employee; Only employees in sales \r\n         department elgible for commission percentage';\r\nCOMMENT ON COLUMN employees.manager_id\r\n         IS 'Manager id of the employee; has same domain as manager_id in \r\n         departments table. Foreign key to employee_id column of employees table.\r\n         (useful for reflexive joins and CONNECT BY query)';\r\nCOMMENT ON COLUMN employees.department_id\r\n         IS 'Department id where employee works; foreign key to department_id \r\n         column of the departments table';\r\nCOMMIT;\r\n<\/pre>\n<p>&nbsp;<\/HTML><\/HTML><\/p>\n","protected":false},"excerpt":{"rendered":"<p>load_sample.sql Print Close The source code for the load_sample.sql is: REM ******************************************************************** REM Create the REGIONS table to hold region information for locations REM HR.LOCATIONS&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-11831","post","type-post","status-publish","format-standard","hentry","category-base-de-conhecimentos"],"_links":{"self":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/11831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11831"}],"version-history":[{"count":3,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/11831\/revisions"}],"predecessor-version":[{"id":13295,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/11831\/revisions\/13295"}],"wp:attachment":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}