Question 1
What is a view in SQL?
A physical table stored on disk
A stored procedure
A virtual table based on a SELECT query
A temporary table
Question 2
Which command is used to create a view?
CREATE TABLE view_name
CREATE INDEX view_name
CREATE VIEW view_name AS
CREATE TRIGGER view_name
Question 3
Which of the following is not true about views?
Views can be updated directly in all cases
Views are used to simplify complex queries
Views provide security by restricting access to data
Views can be created from one or more tables
Question 4
What is the purpose of an index in SQL?
To reduce table size
To improve query performance
To change table schema
To back up the table
Question 5
Which type of index automatically applies to the primary key?
Bitmap index
Hash index
Clustered index
B-tree index
Question 6
Which of the following is true about indexes?
Indexes slow down SELECT queries
Indexes decrease insert and update performance slightly
Indexes are used for data encryption
Indexes are mandatory for foreign keys
Question 7
What is a cursor in SQL?
A trigger event
A loop controller for stored procedures
A control structure to fetch rows one at a time
A form of index
Question 8
Which of the following is not a step in using an explicit cursor?
Declare the cursor
Close the cursor
Rollback the cursor
Open the cursor
Question 9
Which type of cursor is declared automatically by the database?
Explicit cursor
Implicit cursor
Forward cursor
External cursor
Question 10
What is a trigger in SQL?
A type of function
A scheduled backup job
An automatic process
A temporary table
There are 10 questions to complete.