Set any field as a unique identifier. As an example, consider that employee data must be entered in the table name ** EmployeeDetails. ** In this case, employee_id can be considered unique.
use the SELECT query . select * from EmployeeDetails, where employee_id = "unique key value"; if the result set is not empty, use the UPDATE query to update the fields.
update EmployeeDetails set Employee_id = ?, Full_name = ?, Obvalue = ?, Email_id = ?, Password =? where Employee_id = '"+ id +"' "; If the result set is empty, use the INSERT query to insert values into the table
Insert into values EmployeeDetails (...)
VALARMATHI
source share