How do i edit a particular data entry in MySQL? for instance I've table in regards to a private information, however i simply want to edit the Name table, can one simply do it such as this?

"Update Personal_Info
set first_name='"+getFirstName()+"' ,last_name = ?
where emp_id = 2011-01015" 

In which the question mark within the surname will retain it's value.I'm by using this type of approach, because I don't want to hard code everything. the thing is during my UI , I'll make use of a form in which the user will choose if he want's to update just the name and surname. I emerged with this particular idea since it might be simpler for me personally. but suggestions are welcome.

Include only individuals posts whose value you need to update. Suppose if you wish to update first_title then statement is going to be:

String sql="Update Personal_Info set first_name=? where emp_id=?";
PreparedStatement ps=conn.prepareStatement(sql);
ps.setString(1,getFirstName()); // set parameter value for first_name
ps.setString(2,"2011-01015");   //     parameter value for emp_id    
ps.executeUpdate();
ps.close();
conn.close();

EDIT:

String sql="Update Personal_Info set first_name=? where emp_id='2011-01015'";
PreparedStatement ps=conn.prepareStatement(sql);
ps.setString(1,getFirstName()); // set parameter value for first_name
ps.executeUpdate();
ps.close();
conn.close();

Yes, that you can do by doing this. But you should look at using PreparedStatements to omit possible SQL injections inside your application.