Given database schema: Faculty (fid, name, tenured, dname, s…
Given database schema: Faculty (fid, name, tenured, dname, salary, chairID)Department (dname, phoneNumber, numberOfFaculty)Course (fid, dname, semester, cname) Write a trigger (one trigger command) in SQL for the following statement: When a new record is inserted into Faculty, if the department does not exist in the Department table, then insert a record into Department with the same department name and the phone number equal to null. Additionally, when a record is deleted from Faculty, if the faculty member is tenured, then raise an error (use RAISE_APPLICATION_ERROR(-10000, ’error’)).
Read Details