Exam: DP-900: Microsoft Azure Data Fundamentals 0 Likes
You have an inventory management database that contains the following (DP-900)
You have an inventory management database that contains the following table.
Which statement should you use in a SQL query to change the inventory quantity of Product1 to 270?
A. INSERT
B. MERGE
C. UPDATE
D. CREATE
Solution
Correct answer: C. UPDATE.
Analyzing the options:
INSERT: Used to insert new records into a table. It is not suitable for modifying existing data.
MERGE: Combines INSERT, UPDATE and DELETE operations in a single statement. It is more complex and is not necessary for this simple case.
UPDATE: This is the correct option for modifying existing data in a table.
CREATE: Used to create new tables, not to modify data.
To change the inventory quantity of Product1 to 270 in the given table, you would use the UPDATE statement in SQL.
Category: Core Data Concepts