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. CREATE TABLE table_name AS SELECT ...;
B. CREATE TABLE table_name (column1 datatype, column2 datatype);
C. Neither
D. Both A and B
Answer: Option D
Solution (By JKSSB Mock Tests)
Both syntaxes are valid: direct CREATE TABLE with columns, and CREATE TABLE ... AS SELECT to create a table from a query result.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
What is the purpose of the SQL 'CONSTRAINT' keyword?
A. To create views
B. To create indexes
C. To define rules for data integrity
D. To join tables

Correct Answer: Option C


Explanation:
Constraints are used to enforce rules on data, such as NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK.

This question belongs to: Computer Database Management System (DBMS)
Question #2
Which of the following is true about a surrogate key?
A. It is a natural key derived from the data
B. It is a composite key
C. It is an artificial key, usually an auto-increment integer, with no business meaning
D. It is a foreign key

Correct Answer: Option C


Explanation:
A surrogate key is a system-generated unique identifier, typically numeric, that has no business significance.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What is the alternative mathematical term used for a 'Table' in a relational database model?
A. Attribute
B. Relation
C. Domain
D. Tuple

Correct Answer: Option B


Explanation:
In relational model terminology introduced by E.F. Codd, a table is formally referred to as a relation.

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