In PL SQL, Create a trigger on employees that will not allow employees to update salary for Accountants. Executes the trigger body before the triggering DML event on a table. As result of your trigger the following message should be displayed “ You are not allowed to update accountants salary” Hint: Use when clause

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter8: Advanced Sql
Section: Chapter Questions
Problem 69C: Update the DETAILRENTAL table to set the values in DETAIL_RETURNDATE to include a time component....
icon
Related questions
Question

In PL SQL, Create a trigger on employees that will not allow employees to update salary for Accountants.

Executes the trigger body before the triggering DML event on a table.

As result of your trigger the following message should be displayed “ You are not allowed to update accountants salary”

Hint: Use when clause

EMPLOYEE_ID FIRST_NAME t LAST_NAME
EMAIL
PHONE_NUMBER
HIRE DATE JOB_ID
SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
100 Steven
King
SKING
515.123.4567
17-06-03
AD_PRES
24000
(null)
(null)
90
AD VP
13-01-01 AD_VP
2
101 Neena
Kochhar
NKOCHHAR 515.123.4568
21-09-05
17000
(null)
100
90
3
102 Lex
De Haan
LDEHAAN 515.123.4569
17000
(null)
100
90
4
103 Alexander Hunold
AHUNOLD 590.423.4567
03-01-06
IT_PROG
9000
(null)
102
60
104 Bruce
Ernst
BERNST
590.423.4568
21-05-07
IT PROG
6000
(null)
103
60
6
105 David
Austin
DAUSTIN 590.423.4569
25-06-05 IT_PROG
4800
(null)
103
60
IT_PROG
IT PROG
7
106 Valli
Pataballa VPATABAL 590.423.4560
05-02-06
4800
(null)
103
60
8
107 Diana
Lorentz
DLORENTZ 590.423.5567
07-02-07
4200
(null)
103
60
9
108 Nancy
Greenberg NGREENBE 515.124.4569
17-08-02
FI_MGR
12008
(null)
101
100
10
109 Daniel
Faviet
DFAVIET 515.124.4169
16-08-02
FI ACCOUNT
9000
(null)
108
100
11
110 John
Chen
JCHEN
515.124.4269
28-09-05
FI_ACCOUNT
8200
(null)
108
100
12
111 Ismael
Sciarra
ISCIARRA 515.124.4369
30-09-05
FI_ACCOUNT
7700
(null)
108
100
13
112 Jose Manuel Urman
JMURMAN 515.124.4469
07-03-06
FI_ACCOUNT
7800
(null)
108
100
14
113 Luis
Popp
LPOPP
515.124.4567
07-12-07
FI ACCOUNT
6900
(null)
108
100
15
114 Den
Raphaely
DRAPHEAL 515.127.4561
07-12-02
PU_MAN
11000
(null)
100
30
Transcribed Image Text:EMPLOYEE_ID FIRST_NAME t LAST_NAME EMAIL PHONE_NUMBER HIRE DATE JOB_ID SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID 100 Steven King SKING 515.123.4567 17-06-03 AD_PRES 24000 (null) (null) 90 AD VP 13-01-01 AD_VP 2 101 Neena Kochhar NKOCHHAR 515.123.4568 21-09-05 17000 (null) 100 90 3 102 Lex De Haan LDEHAAN 515.123.4569 17000 (null) 100 90 4 103 Alexander Hunold AHUNOLD 590.423.4567 03-01-06 IT_PROG 9000 (null) 102 60 104 Bruce Ernst BERNST 590.423.4568 21-05-07 IT PROG 6000 (null) 103 60 6 105 David Austin DAUSTIN 590.423.4569 25-06-05 IT_PROG 4800 (null) 103 60 IT_PROG IT PROG 7 106 Valli Pataballa VPATABAL 590.423.4560 05-02-06 4800 (null) 103 60 8 107 Diana Lorentz DLORENTZ 590.423.5567 07-02-07 4200 (null) 103 60 9 108 Nancy Greenberg NGREENBE 515.124.4569 17-08-02 FI_MGR 12008 (null) 101 100 10 109 Daniel Faviet DFAVIET 515.124.4169 16-08-02 FI ACCOUNT 9000 (null) 108 100 11 110 John Chen JCHEN 515.124.4269 28-09-05 FI_ACCOUNT 8200 (null) 108 100 12 111 Ismael Sciarra ISCIARRA 515.124.4369 30-09-05 FI_ACCOUNT 7700 (null) 108 100 13 112 Jose Manuel Urman JMURMAN 515.124.4469 07-03-06 FI_ACCOUNT 7800 (null) 108 100 14 113 Luis Popp LPOPP 515.124.4567 07-12-07 FI ACCOUNT 6900 (null) 108 100 15 114 Den Raphaely DRAPHEAL 515.127.4561 07-12-02 PU_MAN 11000 (null) 100 30
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning