Loading

Quipoin Menu

Learn • Practice • Grow

sql / Views
mcq
Direction: Choose the correct option

Q1.

What is a view in SQL?
A. Stored procedure
B. Physical table
C. Index
D. Virtual table based on SELECT
Direction: Choose the correct option

Q2.

CREATE VIEW emp_dept AS SELECT e.name, d.dept_name FROM employees e JOIN departments d ON e.dept_id = d.dept_id;
What does this do?
A. Inserts data
B. Creates a table
C. Creates a view
D. Updates data
Direction: Choose the correct option

Q3.

Why use views?
A. Security, simplicity, consistency
B. Faster queries
C. Index data
D. Store data
Direction: Choose the correct option

Q4.

CREATE VIEW high_salary AS SELECT * FROM employees WHERE salary > 70000 WITH CHECK OPTION;
What does WITH CHECK OPTION do?
A. Checks syntax
B. Prevents updates that remove rows from view
C. Validates data
D. Optimizes query
Direction: Choose the correct option

Q5.

How do you remove a view?
A. ALTER VIEW
B. DROP VIEW
C. REMOVE VIEW
D. DELETE VIEW