Question: Updating rows who has same id with different values for each row from java program
Here is my requirement,
Following is a table which contains 5 rows with same id.
sid sname age 2 aruna 25 2 balu 30 2 srinu 40 2 murali 30 3 lavanya 35 1 ashok 27 1 suresh 24 1 surya 25 1 arya 28 1 sravan 30
Folllowing is my requirement:
If multiple rows have same sid then only we have to update those records.(In this example 4 records are there with sid 2 value and 5 records with sid 1 value.we have to change only those records.) I have to update the records which contains sid 1. But i have to update first row (having sid 1) with "naveen" as value for sname column.And second row(having sid 1) with "varun" as a value for sname column and so on 5th row (having sid 1) with "lalitha" as a value for sname column from java program. Same for records with sid 2 value.