How can I edit a certain data entry in MySQL? for example I have table about a personal information, but I only want to edit the First Name table, can i just do it like this?
"Update Personal_Info
set first_name='"+getFirstName()+"' ,last_name = ?
where emp_id = 2011-01015"
Where the question mark in the last name will retain it’s value.I am using this kind of approach, because I do not want to hard code everything. you see in my UI , I’ll use a form where the user will choose if he want’s to update only the first name and last name. I came up with this idea since it would be easier for me. but suggestions are welcome.
Include only those columns whose value you want to update. Suppose if you want to update first_name then statement will be:
EDIT: