PrepAway - Latest Free Exam Questions & Answers

How many new records will be written to the database?

Given the following statements:
CREATE TABLE t1 (c1 INTEGER, c2 CHAR(5));
CREATE TABLE t1audit (user VARCHAR(20), date DATE, action
VARCHAR(20));
CREATE TRIGGER trig1 AFTER INSERT ON t1
FOR EACH ROW
MODE DB2SQL
INSERT INTO t1audit VALUES (CURRENT USER, CURRENT DATE,
‘Insert’);
If user USER1 executes the following statements:
INSERT INTO t1 VALUES (1, ‘abc’);
INSERT INTO t1 (c1) VALUES (2);
UPDATE t1 SET c2 = ‘ghi’ WHERE c1 = 1;
How many new records will be written to the database?

PrepAway - Latest Free Exam Questions & Answers

A.
0

B.
2

C.
3

D.
4

2 Comments on “How many new records will be written to the database?


Leave a Reply