Question: Given a table Products with columns ( id , name, price, QTY ) , which of the following statements is TRUE? CREATE VIEW vTest AS
Given a table Products with columns id name, price, QTY which of the following statements is TRUE?
CREATE VIEW vTest AS SELECT distinct name FROM Products;
INSERT INTO vTest VALUES iphone;
The INSERT statement will run successfully since the vTest view is updatable.
CREATE VIEW vTest AS SELECT sumprice FROM Products WHERE QTY ;
INSERT INTO vTest VALUES ;
The INSERT statement will run successfully since the vTest view is updatable.
CREATE VIEW vTest AS SELECT name, price FROM Products group by name;
INSERT INTO vTest VALUES headphones;
The INSERT statement will fail since the vTest view is nonupdatable
CREATE VIEW vTest AS SELECT avgprice FROM Products WHERE price ;
INSERT INTO VT est VALUES ;
The INSERT statement will run successfully since the vTest view is updatable.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
