SQL Views MCQ Questions & Answers

This section focuses on the "Views" in SQL. These Multiple Choice Questions (MCQ) should be practiced to improve the SQL skills required for various interviews (campus interview, walk-in interview, company interview), placements and other competitive examinations.

1. Views can be created for?

A. One table
B. Many table
C. another view
D. All of the above

View Answer


2. A view is actually a?

A. composition of a table
B. decomposition of a table
C. associated to a table
D. None of the above

View Answer


3. What is true about view?

A. Database views are created using the CREATE VIEW statement.
B. To create a view, a user must have the appropriate system privilege according to the specific implementation.
C. Both A and B are true
D. Both A and B are false

View Answer


4. Which option in view is to ensure that all UPDATE and INSERTs satisfy the condition(s) in the view definition?

A. Uncheck
B. With Check
C. Check
D. With

View Answer


5. Can we insert and delete rows into a View?

A. Yes
B. No
C. Rows of data can be inserted but can not deleted
D. Rows of data can be deleted but cacn not inserted

View Answer


6. What is syntax for delete the view?

A. DELETE VIEW view_name;
B. DROP VIEW view_name/table_name;
C. DROP VIEW view_name;
D. DROP VIEW table_name;

View Answer


7. All NOT NULL columns from the base table must be included in the view in order for the INSERT query to function.

A. TRUE
B. FALSE
C. All NULL columns from the base table must be included in the view in order for the INSERT query to function.
D. None of the above

View Answer


8. Which of the following creates a virtual relation for storing the query?

A. Function
B. View
C. Procedure
D. All of the above

View Answer


9. Which of the following is false?

A. We can update a view if it has multiple database relations in the from clause
B. One view can be used in the expression defining another view
C. Both A and B
D. None of the above

View Answer


10. _______ views help to keep the database up-to-date.

A. View materialization
B. View isolation
C. View updating
D. View maintenance

View Answer






Discussion


* You must be logged in to add comment.