The SQL command used to change the values stored in the name attribute of…
2021
The SQL command used to change the values stored in the name attribute of existing rows in the PUBLISHER relation is
Answer: A. UPDATE — ConceptSQL separates changes to stored row data from changes to a table definition. Data-manipulation statements act on rows, while data-definition statements…
- A.
UPDATE
- B.
ALTER
- C.
MODIFY
- D.
DELETE
Show answer & explanation
Correct answer: A
Concept
SQL separates changes to stored row data from changes to a table definition. Data-manipulation statements act on rows, while data-definition statements act on schema objects such as columns and constraints.
To replace a value in an existing row, use UPDATE with a SET clause; a WHERE clause limits which rows are changed.
Application
Identify the target as an existing relation,
PUBLISHER, whose rows already contain publisher names.The required operation changes the stored value of the
nameattribute; it does not change the attribute definition.The matching statement form is
UPDATE PUBLISHER SET name = <new_name> WHERE <condition>;Therefore, the applicable command is
UPDATE.
Cross-check and contrast
UPDATEassigns replacement column values to selected existing rows.ALTERchanges the schema of a table, such as its columns or constraints.MODIFYis used in some dialects within schema-alteration syntax to redefine a column.DELETEremoves selected rows instead of replacing a value within them.
Result: UPDATE is the command for changing publisher-name values in existing rows.