please use sql to answer the following question Create a procedure, ADD_EMPLOYEE., to insert a new employee into the EMPLOYEES table. The procedure should call a VALID_DEPTID function to check whether...


please use sql to answer the following question


Create a procedure, ADD_EMPLOYEE., to insert a new employee into the EMPLOYEES table. The procedure should call a VALID_DEPTID function to check whether the department ID specified for the new employee exists in the DEPARTMENTS table.


b. Create the ADD_EMPLOYEE procedure to add an employee to the EMPLOYEES table.
The row should be added to the EMPLOYEES table if the VALID_DEPTID function
retums TRUE: otherwise. alert the user with an appropriate message. Provide the
following parameters:
- first_name
- last_name
- email
- job: Use ‘SA_REP’ as the default
- mgr: Use 145 as the default
- sal: Use 1000 as the default
- comm: Use o as the default
- deptid: Use 30 as the default
- Use the EMPLOYEES_SEQ sequence to set the employee_id column
- Setthe hire_date column to TRUNC (SYSDATE)



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here