PrepAway - Latest Free Exam Questions & Answers

Which of the following INSERT statements will fail to execute?

Given the following statements:
CREATE TABLE tab1 (c1 INTEGER, c2 CHAR(5));
CREATE VIEW view1 AS SELECT c1, c2 FROM tab1 WHERE c1 < 100;
CREATE VIEW view2 AS SELECT c1, c2 FROM view1
WITH CASCADED CHECK OPTION;
Which of the following INSERT statements will fail to execute?

PrepAway - Latest Free Exam Questions & Answers

A.
INSERT INTO view2VALUES(50, ‘abc’)

B.
INSERT INTO view1 VALUES (100, ‘abc’)

C.
INSERT INTO view2VALUES(150, ‘abc’)

D.
INSERT INTO view1VALUES(100, ‘abc’)

One Comment on “Which of the following INSERT statements will fail to execute?

  1. Chow, Kenneth KY says:

    CASCADED
    The WITH CASCADED CHECK OPTION constraint on a view V means that V inherits the search conditions as constraints from any updatable view on which V is dependent. Furthermore, every updatable view that is dependent on V is also subject to these constraints. Thus, the search conditions of V and each view on which V is dependent are ANDed together to form a constraint that is applied for an insert or update of V or of any view dependent on V.
    LOCAL
    The WITH LOCAL CHECK OPTION constraint on a view V means the search condition of V is applied as a constraint for an insert or update of V or of any view that is dependent on V.




    0



    0

Leave a Reply