Which keyword in the UPDATE statement is used to assign values to columns?
A. ASSIGN
B. SET
C. MARK
D. GET
Answer: Option B
Solution (By Examveda Team)
This question is about the UPDATE statement in MySQL. The UPDATE statement is used to change data in existing rows of a table.We need to find the keyword that is used to actually assign the new values to the columns we want to change.
Let's look at the options:
* Option A: ASSIGN - This keyword isn't used in the UPDATE statement.
* Option B: SET - This is the keyword used in the UPDATE statement to assign values to columns.
* Option C: MARK - This keyword isn't used in the UPDATE statement.
* Option D: GET - This keyword isn't used in the UPDATE statement.
So the correct answer is Option B: SET .
Here's a simple example of how you'd use the SET keyword in an UPDATE statement:
```sql UPDATE Customers SET FirstName = 'John', LastName = 'Doe' WHERE CustomerID = 1; ```
This statement updates the Customers table. It sets the FirstName to 'John' and LastName to 'Doe' for the row where CustomerID is 1.

Join The Discussion