What is the MOST appropriate way to update the email address for a user named 'John Doe' in a database, knowing that there may be multiple users with that name, but each user has a unique identifier (UserID)?
Use an UPDATE statement that changes the email address where the user's first name is 'John' and the last name is 'Doe'.
Use an UPDATE statement with the correct email address where the UserName is 'jdoe'.
Use an UPDATE statement to change the email address where the UserID matches John Doe's unique identifier.
Issue a SELECT command to find all users named 'John Doe' and update the email address individually for each record returned.
The correct approach to updating a user's email address when there are potential duplicates in user names is to use the unique identifier to specify which 'John Doe' should have the email address updated. The email address is not a unique identifier and updating based on name alone could result in updating the wrong person if there are multiple users with the same name. The UserID, which is unique for each user, must be used in the WHERE clause of the UPDATE statement to precisely target the correct record.
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 a unique identifier in a database?
Open an interactive chat with Bash
Why is using a name to update database records problematic?
Open an interactive chat with Bash
What does the SQL UPDATE statement do?
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 .