Which of the following is a valid SQL statement to create a view? MCQ with Answer and Explanation

Which of the following is a valid SQL statement to create a view?
A. Neither
B. CREATE VIEW view_name AS SELECT ...;
C. CREATE VIEW view_name (columns) AS SELECT ...;
D. Both A and B
Answer: Option D
Solution (By JKSSB Mock Tests)
Both syntaxes are valid: CREATE VIEW view_name AS SELECT ... and with column aliases.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
Which operator in SQL is used to exclude specific data records from a search based on a collection of negative criteria?
A. NOT IN
B. MINUS
C. REMOVE
D. EXCEPT

Correct Answer: Option A


Explanation:
The NOT IN operator filters the query results to exclude records whose values match any element within the provided list or subquery.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is the purpose of the SQL 'UNION' operator?
A. To join tables horizontally
B. To filter duplicates
C. To aggregate data
D. To combine the results of two or more SELECT statements, removing duplicates

Correct Answer: Option D


Explanation:
UNION concatenates the result sets of two or more queries, eliminating duplicate rows. UNION ALL keeps duplicates.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which normal form requires that all attributes in a table contain only atomic, indivisible values, and prohibits multi-valued attributes?
A. First Normal Form (1NF)
B. Third Normal Form (3NF)
C. Boyce-Codd Normal Form (BCNF)
D. Second Normal Form (2NF)

Correct Answer: Option A


Explanation:
A relation is in First Normal Form (1NF) if and only if the domain of every attribute contains only atomic (indivisible) values, and no repeating groups exist.

This question belongs to: Computer Database Management System (DBMS)