QuestionQ249Verified/Managing Schema ObjectsCopy linkReport a problemAsk AstroTutorSave questionRefer to the exhibit for the SALES table definition. Which views can support all DML operations? Choose twoACREATE VIEW v3 AS SELECT * FROM SALES WHERE cust_id = 2034 WITH CHECK OPTION;BCREATE VIEW v1 AS SELECT * FROM SALES WHERE time_id <= SYSDATE - 2*365 WITH CHECK OPTION;CCREATE VIEW v2 AS SELECT prod_id, cust_id, time_id FROM SALES WHERE time_id <= SYSDATE - 2*365 WITH CHECK OPTION;DCREATE VIEW v4 AS SELECT prod_id, cust_id, SUM(quantity_sold) FROM SALES WHERE time_id <= SYSDATE - 2*365 GROUP BY prod_id, cust_id WITH CHECK OPTION;Show AnswerAnswerExplanationA simple view over one base table can support inserts, updates, and deletes when it includes the required base-table columns. WITH CHECK OPTION permits DML but requires inserted or updated rows to continue satisfying the view predicate. A and B expose all required SALES columns. C omits required NOT NULL columns, so inserts cannot succeed, and D contains an aggregate and GROUP BY, so it is not directly modifiable.Learn moreOracle Database Administrator’s Guide — Managing Views, Sequences, and SynonymsOracle Database SQL Language Reference — CREATE VIEWShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion