Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL Code-In this question you will create a Trigger. The trigger watches any UPDATE on the EMPLO table and record them in the SAL_HIST table.

SQL Code-In this question you will create a Trigger. The trigger watches any UPDATE on the EMPLO table and record them in the SAL_HIST table. View the schema of both tables before you start. (Code for table creation attached)Create a trigger that add a new record in the SAL_ HIST table ONLY WHEN an update is made on the SALARY field of the EMPLOYEES table. Reject any increase more than 75% of the old salary with a proper application error message.Write a SQL statement for Update the SALARY of employee_id 110 to 8900?

CREATE TABLE SAL_HIST (TR_ID NUMBER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, EMP_ID NUMBER, OLD_SAL NUMBER, NEW_SAL NUMBER, DATE_CHANGE DATE ); SELECT * FROM SAL_HIST;

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 Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

=+vii. Bullet points to emphasize important ideas.

Answered: 1 week ago

Question

Explain exothermic and endothermic reactions with examples

Answered: 1 week ago

Question

Write a short note on rancidity and corrosiveness.

Answered: 1 week ago

Question

Differentiate between hard and soft measures of service quality.

Answered: 1 week ago

Question

Be familiar with the different perspectives of service quality.

Answered: 1 week ago