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 sum(price) FROM Products WHERE QTY >0;
INSERT INTO vTest VALUES (52000);
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',50);
The INSERT statement will fail since the vTest view is non-updatable
CREATE VIEW vTest AS SELECT avg(price) FROM Products WHERE price >10;
INSERT INTO VT est VALUES (3000);
The INSERT statement will run successfully since the vTest view is updatable.
 Given a table Products with columns (id, name, price, QTY), which

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!