Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

Answer First lets create the professoraudittrail table which will be used to store the deleted profe... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

Students also viewed these Operating System questions

Question

8. Of what use is the central limit theorem in estimation?

Answered: 1 week ago