893. Replace view — reporting task 2

DBMS Published Updated 0 Views Verified
Implement this reusable reporting layer in MySQL. Use a view when the result definition should be reusable rather than physically stored.
Looking for the latest Sarkari Result 2026 updates? Check the latest government exam results, merit lists and result updates on Sarkari Resultess.
Sarkari Resultess
Questions & Answers

Answer & Explanation

4 Answers
Verified

Option A

Create a primary key on the SELECT statement itself.
Additional Explanation
This option is incorrect for the stated requirement.
Sarkari Resultess
Editorial Answer 1
Verified

Option B

Use DELETE to create a view.
Additional Explanation
This option is incorrect for the stated requirement.
Sarkari Resultess
Editorial Answer 2
Verified

Option C

Create a trigger instead of a view for a read-only report.
Additional Explanation
This option is incorrect for the stated requirement.
Sarkari Resultess
Editorial Answer 3
Verified Correct Answer

Option D

CREATE OR REPLACE VIEW active_customers AS SELECT id,name,email,city FROM customers WHERE status='active';
Additional Explanation
Correct implementation. Prefer parameterized queries in application code, validate affected rows for UPDATE/DELETE, and use transactions for related writes.
Sarkari Resultess
Editorial Answer 4