Question: 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

1 Expert Approved Answer
Step: 1 Unlock

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