Which SQL statement edits a row in a table?

Study for the SQL Basics Test. Improve your knowledge with multiple choice questions and detailed explanations. Prepare effectively to master SQL concepts!

Multiple Choice

Which SQL statement edits a row in a table?

Explanation:
Editing existing records in a table is done with the UPDATE statement. It lets you change one or more column values for rows that meet a condition. For example, UPDATE employees SET salary = 60000 WHERE employee_id = 123 updates only that row. The WHERE clause limits which rows are changed; without it, every row in the table would be updated. The other options don’t perform edits: Where is a conditional part of statements to filter rows, not a stand-alone edit; Is Null checks for null values; Add isn’t used to modify existing rows (the command to insert new rows is INSERT).

Editing existing records in a table is done with the UPDATE statement. It lets you change one or more column values for rows that meet a condition. For example, UPDATE employees SET salary = 60000 WHERE employee_id = 123 updates only that row. The WHERE clause limits which rows are changed; without it, every row in the table would be updated. The other options don’t perform edits: Where is a conditional part of statements to filter rows, not a stand-alone edit; Is Null checks for null values; Add isn’t used to modify existing rows (the command to insert new rows is INSERT).

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy