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

Which of the following is a valid SQL statement to update a record?
A. CHANGE table_name SET column1 = value1 WHERE condition;
B. UPDATE table_name SET column1 = value1 WHERE condition;
C. MODIFY table_name SET column1 = value1 WHERE condition;
D. UPDATE table_name column1 = value1 WHERE condition;
Answer: Option B
Solution (By JKSSB Mock Tests)
The correct syntax for UPDATE is: UPDATE table_name SET column1 = value1 WHERE condition;

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 is not an aggregate function in SQL?
A. DESC
B. SUM
C. AVG
D. MAX

Correct Answer: Option A


Explanation:
DESC is a keyword for sorting order, not an aggregate function.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is the purpose of the SAVEPOINT statement?
A. To create a point within a transaction to which you can later roll back
B. To permanently save changes
C. To release locks
D. To start a new transaction

Correct Answer: Option A


Explanation:
SAVEPOINT creates a named point within a transaction, allowing partial rollback to that point without affecting the entire transaction.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Any set of one or more attributes that collectively allow us to uniquely identify tuples in a relation is termed as a what?
A. Secondary Key
B. Foreign Key
C. Super Key
D. Local Key

Correct Answer: Option C


Explanation:
A Super Key is any set of attributes within a table that can uniquely identify a row. A candidate key is a minimal super key.

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