Question: Create 'professor_audit_trail' table. Use the code below: use ; create table professor_audit_trail ( id int unsigned primary key auto_increment not null, ProfessorName VARCHAR(255) not

Create 'professor_audit_trail' table. Use the code below:

 

use ;

create table professor_audit_trail

(

id int unsigned primary key auto_increment not null,

ProfessorName VARCHAR(255) not null,

ProfessorProgram VARCHAR(255) not null

);

Create trigger on professor table which executes whenever a row in professor table is deleted. The deleted professor name and professor program should be stored in the newly created 'professor_audit_trail' table. Note, the ID column in the audit table is NOT the ProfessorId column from the professor table.


 Delete the record in the Professor table where the ProfessorId equals 10.


viii. Display the contents of the professor_audit_trail table.



SQL- Drop

Create the necessary DDL commands to drop the index, view and trigger.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answer First lets create the professoraudittrail table which will be used to store the deleted profe... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!