. Write a postgre SQL statement to drop the existing foreign key fk_job_id from job_history table on job_id column, which is referenced to the job_id of jobs table
Here is the structure of the table job_history.
postgres=# \d job_history
Column | Type | Modifiers
---------------+-----------------------+-----------
employee_id | numeric(6,0) |
start_date | date |
end_date | date |
job_id | character varying(10) |
department_id | numeric(4,0) |
Foreign-key constraints:
"fk_job_id" FOREIGN KEY (job_id) REFERENCES jobs(job_id) ON UPDATE RESTRICT ON DELETE CASCADE
Output:
Now see the structure of the table job_history after being altered.
need an explanation for this answer? contact us directly to get an explanation for this answer