Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

0 0 1 CREATE the following tables - a. Dept triggers - Add Identity Column (1000,1) b. Emp triggers-Add Identity Column (1000,1) c. Emphistory

0 0 1 CREATE the following tables - a. Dept triggers - Add Identity Column (1000,1) b. Emp triggers-Add 

0 0 1 CREATE the following tables - a. Dept triggers - Add Identity Column (1000,1) b. Emp triggers-Add Identity Column (1000,1) c. Emphistory dbo.emp_triggers Columns empid (PK, int, not null) empname (varchar(50), null) deptid (int, null) Keys dbo.emphistory Columns empid (int, null) deptid (int, null) isactive (int, null) Keys Constraints TRIGGERS a. Trigger 1 - Build a trigger on the emp table after insert that adds a record into the emo. History table and marks IsActive column to 1 b. Trigger 2 - Build a tirnner on the emp table after an update of the empname or deptid column - It updates the subsequent empname and/or deptid in the emo history table. c. Build a trigger on the emp table after delete that marks the isactive status = 0 in the emo History table.

Step by Step Solution

3.39 Rating (168 Votes )

There are 3 Steps involved in it

Step: 1

To achieve the described database structure and triggers we will create the necessary tables Dept Emp and Emphistory with the specified column definit... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Databases questions

Question

a sin(2x) x Let f(x)=2x+1 In(be)

Answered: 1 week ago