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

Which of the following is a valid SQL statement to add a new column to a table?
A. Both A and C
B. ALTER TABLE table_name ADD column_name datatype;
C. ALTER TABLE table_name ADD COLUMN column_name datatype;
D. ADD COLUMN TO table_name column_name datatype;
Answer: Option A
Solution (By JKSSB Mock Tests)
Both 'ADD column_name datatype' and 'ADD COLUMN column_name datatype' are valid syntax in some DBMS, but standard SQL uses 'ADD column_name datatype'. However, many DBMS support both.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
Which of the following terms refers to the duplication of data across multiple locations in a non-DBMS file system?
A. Data Redundancy
B. Data Isolation
C. Data Security
D. Data Integrity

Correct Answer: Option A


Explanation:
Data Redundancy refers to the unnecessary duplication of the exact same data in multiple files or locations, which wastes storage and can cause inconsistencies.

This question belongs to: Computer Database Management System (DBMS)
Question #2
Which type of database storage anomaly occurs when adding new data to a table is blocked because other unrelated data is missing?
A. Deletion Anomaly
B. Update Anomaly
C. Modification Anomaly
D. Insertion Anomaly

Correct Answer: Option D


Explanation:
An Insertion Anomaly occurs when certain facts cannot be recorded in a database table without falsely manufacturing or requiring the presence of other unrelated facts.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What is a composite key in a database?
A. A key that is a single column
B. A key that references another table
C. A key that is always a foreign key
D. A key that is made up of multiple columns

Correct Answer: Option D


Explanation:
A composite key is a primary key that consists of two or more columns to uniquely identify a row.

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