A manager at a retail company needs to adjust the price of an item in their inventory database due to a recent change in supplier costs. Using appropriate commands, how would they modify the existing price for this item without affecting any other records in the database?
By using an UPDATE statement to change the item's price where the item ID matches the specific product.
By using a SELECT statement with the new price where the item ID matches the specific product.
By using an INSERT statement with the new price for the item ID.
By deleting the item and adding it again with the new price.
The correct approach is to use an UPDATE statement that changes the price only for the row whose item ID matches the product in question (for example: UPDATE inventory SET price = new_price WHERE item_id = 123;). The UPDATE statement is designed to modify existing data, and the WHERE clause ensures that only the intended record is changed. An INSERT statement would add a new record instead of changing the existing one, a SELECT statement merely retrieves data, and deleting and re-adding the row introduces unnecessary risk to referential integrity and audit trails.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is an UPDATE statement in SQL?
Open an interactive chat with Bash
What purpose does the WHERE clause serve in an UPDATE statement?
Open an interactive chat with Bash
What risks are associated with not using a WHERE clause in an UPDATE statement?
Open an interactive chat with Bash
CompTIA ITF+ FC0-U61 (V5)
Database Fundamentals
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .