In SQL, DML (Data Manipulation Language) statements include SELECT, INSERT, UPDATE, and DELETE. Often, you need to filter which rows are affected or returned. That filtering is done with the WHERE clause.
Let’s review the options:
ALTER
Used in Data Definition Language (DDL), not DML.
Alters the structure of a database object (e.g., add/remove columns, modify constraints).
Not used to filter rows.
ON
Used in JOIN operations to specify the relationship between tables.
Does not specify row-level filtering criteria in general DML.
SET
Used in the UPDATE statement to assign new values to columns.
Does not specify which rows to update.
WHERE
Used in DML statements to specify criteria for rows that must match.
Examples:
SELECT * FROM Customers WHERE Country = 'USA';
DELETE FROM Orders WHERE OrderDate < '2020-01-01';
UPDATE Products SET Price = Price * 1.1 WHERE CategoryID = 5;
Thus, the correct clause is WHERE.
Correct Answer: WHERE
SQL WHERE clause
SQL UPDATE with WHERE
SQL DELETE with WHERE
Microsoft References
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit