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

Which of the following is a valid SQL statement to create a table?
A. Both A and B
B. CREATE TABLE table_name (column1 datatype, column2 datatype);
C. CREATE TABLE table_name AS SELECT ...;
D. Neither
Answer: Option A
Solution (By JKExamLibrary)
Both syntaxes are valid: direct CREATE TABLE with columns, and CREATE TABLE ... AS SELECT to create a table from a query result.

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

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1 Report Error
What does the SQL command 'INSERT INTO' do?
A. Creates a table
B. Deletes rows
C. Adds a new row to a table
D. Updates existing rows

Correct Answer: Option C


Explanation:
INSERT INTO is used to insert new records (rows) into a table.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
Which of the following is a logical data model?
A. Physical model
B. Relational model
C. Hierarchical model
D. Both A and C

Correct Answer: Option D


Explanation:
Logical data models include relational, hierarchical, and network models. Physical models describe storage details.

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
What is the result of the SQL query: SELECT * FROM employees;?
A. All rows and all columns from the employees table
B. An empty result
C. Only the primary key column
D. Only the first row

Correct Answer: Option A


Explanation:
SELECT * retrieves all columns and rows from the specified table.

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