Create a row-level trigger called trg mgr change that will fire when the manager of some...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a row-level trigger called trg mgr change that will fire when the manager of some department is changed. When this happens, the trigger increases the salary of the new manager by 10% and decreases the salary of the old manager by 5%. Test the trigger as follows: (5 points) SQL> SELECT Salary FROM EMPLOYEE WHERE Ssn-'123456789'; SALARY 30000 SQL> SELECT Salary FROM EMPLOYEE WHERE Ssn='333445555'; SALARY 40000 SQL> UPDATE DEPARTMENT SET Mgr_ssn-123456789' WHERE Dnumber=5; SQL> SELECT Salary FROM EMPLOYEE WHERE sn='333445555'; SALARY 38000 SQL> SELECT Salary FROM EMPLOYEE WHERE Ssn='123456789; SALARY 33000 As shown above, the manager of the Research department was changed from Franklin Wong to John Smith, as an expected outcome of the trigger, the salary of Franklin Wong went down by 5% to become 38000 and the salary of the new manage John Smith went up by 10% to become 33000. Create a row-level trigger called trg mgr change that will fire when the manager of some department is changed. When this happens, the trigger increases the salary of the new manager by 10% and decreases the salary of the old manager by 5%. Test the trigger as follows: (5 points) SQL> SELECT Salary FROM EMPLOYEE WHERE Ssn-'123456789'; SALARY 30000 SQL> SELECT Salary FROM EMPLOYEE WHERE Ssn='333445555'; SALARY 40000 SQL> UPDATE DEPARTMENT SET Mgr_ssn-123456789' WHERE Dnumber=5; SQL> SELECT Salary FROM EMPLOYEE WHERE sn='333445555'; SALARY 38000 SQL> SELECT Salary FROM EMPLOYEE WHERE Ssn='123456789; SALARY 33000 As shown above, the manager of the Research department was changed from Franklin Wong to John Smith, as an expected outcome of the trigger, the salary of Franklin Wong went down by 5% to become 38000 and the salary of the new manage John Smith went up by 10% to become 33000.
Expert Answer:
Related Book For
Understanding Business Ethics
ISBN: 9781506303239
3rd Edition
Authors: Peter A. Stanwick, Sarah D. Stanwick
Posted Date:
Students also viewed these databases questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
You are developing an industrial building with a gross building area of 150,000 sf. The building efficiency ratio is 75%. The market gross rent is $25 psf. The vacancy rate is 5%; the cap rate is 5%;...
-
Every organization is faced with some kind of risk or threat that could cause an interruption to the organization's operations. These risks and threats can be internal or external. To prepare for...
-
How large is the drainage basin of the Mississippi River?
-
Ludvig Ahlquist, who has considerable experience in the home security industry, is planning to launch a new line of home security alarms that he believes would be superior to other products in the...
-
In the text, we considered a sequential move game in which an entrant was considering entering an industry in competition with an incumbent firm (Figure 15-1). Consider now that the entrant, if...
-
Which three design considerations to limit the scope of EIGRP queries are correct?
-
Review the non-GAAP adjustments listed for this company in Appendix B. (a) Put yourself in the position of a company spokesperson. Explain a rationale that the company would communicate to the...
-
Anita is a 40-year-old woman who prides herself on taking charge of her health. She exercises daily, whether it's walking her dog, playing golf, or a tai chi class at the senior center. She chooses a...
-
1. Adsorption Equilibrium. Experimental equilibrium data for the adsorption of methane on Calgon Carbon Corp. PCB activated carbon are listed in table below. Determine if the Langmuir isotherm is a...
-
Write a report in which you support project team members and staff during the implementation of a project, using evidence-based initiatives, to promote a healthy work environment and work-life...
-
Write short shell scripts according to the following specifications. Submit a listing and document what you tested and the results. The scripts are all very short and show be submitted in your...
-
20220 a) In a cricket tournament, the probability that team A wins a game is B. Apply maximum likelihood estimate and compute the winning probability for the team A, considering the past seven...
-
Managers can enforce rules about what people do and say at work. Can they enforce a culture? If yes, how can they do it? If not, what does this say about the limits of managers, ability to ensure...
-
b) A tank of water in the shape of a cone is leaking water at a constant rate of 2ft/hour. The base radius of the tank is 5 ft and the height of the tank is 14 ft. (i) At what rate is the depth of...
-
A parking lot charges $3 for the first hour (or part of an hour) and $2 for each succeeding hour (or part), up to a daily maximum of $10. (a) Sketch a graph of the cost of parking at this lot as a...
-
On May 18, 2002, Tyco CEO Dennis Kozlowski, who had received his degree in accounting and finance from Seton Hall University in 1968, gave the commencement address to St. Anselms College in...
-
Why do you think Pepsi decided to release the AMP app in the opening vignette? Do you think Pepsi officials were surprised by the response of the public?
-
On March 11, 2011, at 2:46 p.m., a 9.0 magnitude earthquake shook Japan and created a tsunami of epic proportions. The earthquake was so powerful that it moved the Japanese coastline and made Japan...
-
Cairo Corporation has government bonds classified as held-for-collection at December 31, 2015. These bonds have a par value of \($800\),000, an amortized cost of \($800\),000, and a fair value of...
-
On January 1, 2015, Meredith Corporation purchased 25% of the ordinary shares of Pirates Company for 200,000. During the year, Pirates earned net income of 80,000 and paid dividends of 20,000....
-
On January 2, 2015, MacCloud Co. issued a 4-year, 100,000 note at 6% fixed interest, interest payable semiannually. MacCloud now wants to change the note to a variable-rate note. As a result, on...
Study smarter with the SolutionInn App