Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CREATE TRIGGER patient _ data _ trigger AFTER INSERT ON patient _ data FOR EACH ROW BEGIN INSERT INTO patient _ data _ audit (

CREATE TRIGGER patient_data_trigger
AFTER INSERT ON patient_data
FOR EACH ROW
BEGIN
INSERT INTO patient_data_audit (system_user_id, current_time, patient_id, first_name, last_name, date_of_birth, gender, email_address)
VALUES (system_user_id(), NOW(), NEW.patient_id, NEW.first_name, NEW.last_name, NEW.date_of_birth, NEW.gender, NEW.email_address);
END;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions