Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Select the right answer: A. 0 row B. 1 rows C. 2 rows D. d. 3 rows D. Given the following PLSQL code: CREATE

image text in transcribedimage text in transcribed

Select the right answer: A. 0 row B. 1 rows C. 2 rows D. d. 3 rows D. Given the following PLSQL code: CREATE OR REPLACE PROCEDURE Add Student (sID IN Number, SFN IN varchar20), SLN IN varchar(20), SAD IN varchar(20)) AS BEGIN INSERT INTO student VALUES (SID, SFN, SLN, SAD); INSERT INTO student_log VALUES(SYSDATE, User, 'Table Insert'); END; BEGIN Add Student(4, 'Carrey', 'John', 'Chicago, IL', 15.0); END; What happens if a user runs above PLSQL code, select the right answer: A. A.Add a new row to student table B.Add a new row to student log table C.Code doesn't work. D.Add a new row to student and student_log Ln 46, Col 1 45F Sunny FULL HD 144HZ a *triggers Notepad File Edit View 2. PLSQL & Triggers (10 pts) A database was created with the following sql: CREATE TABLE student (sID integer primary key, sLastName varchar(20), sFirstName varchar(20), sAddress varchar(20), wage number(7,2)); INSERT INTO student VALUES (1,'Baker, Jane', 'Chicago, IL', 0.01) INSERT INTO student VALUES (2, Julia', 'Mike, 'Chicago IL', 0.02) INSERT INTO student VALUES (3, 'Wu', 'Mark', Chicago IL', 10.1) CREATE TABLE student_log (operation Date Date, userName varchar(20), action varchar(20)); A. Write a trigger that wil run the following query AFTER a user attempts to update the student table INSERT INTO student_log (operation Date, user Name, action) VALUES (Sysdate, User, 'Table Update'); B. With your trigger in question (2.a), if a user run the following update sql, the row will be inserted into student_log table: UPDATE student SET wage = 15.0 WHERE SID < 3; Select the right answer: A. 0 row B. 1 rows C. 2 rows D. 3 row C. With your trigger in question (2.a), if a user run the following delete sql therow will be inserted into student_log table: DELETE FROM student WHERE SID

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

The derivation and characteristics of the golden ratio

Answered: 1 week ago