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.
student table:
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.
View Answers
Ads
Related Tutorials/Questions & Answers:
Advertisements
Arraylist from row values
Arraylist
from row values Hello,
can anyone please help on how to make an arraylist
from the
row values of a particular column
from a database...("select *
from employee");
ArrayList<String> list=new ArrayList<
Delete a row from database by id
Delete a
row from database by id I m creating a small application... all the
values are added in to database and page is redirected to a new page...) for "DELETE" AND "UPDATE".
On clicking delete which is hyper link that particular
row
row_id
row_id sir i have created a table my_table with two
rows n two column with smillar name in
each cell without any primary key , how can i change the first
row and third column's name in sql server 2005 , kindly send me the query
row_id
row_id sir i have created a table my_table with two
rows n two column with smillar name in
each cell without any primary key , how can i change the first
row and third column's name in sql server 2005 , kindly send me the query
Java Comparison
Java Comparison
Java Vs Script
The Java and
Java Script are completely
different from each other
although posses
same name but don't have
Multithreading in Java
Multithreading in
java is running multiple threads sharing
same address space concurrently. A multithreaded
program has two or more parts running simultaneously.
Each part is called a thread and
has a separate path of execution
different output trying to execute same java code
different output trying to execute
same java code i am using net beans 7 ide and
java 6 to develop my
java projects. i used the following coding... there is
different output trying to execute
same java code
different output trying to execute same java code
different output trying to execute
same java code i am using net beans 7 ide and
java 6 to develop my
java projects. i used the following coding... " portList : false"
Why there is
different output trying to execute
same java
different output trying to execute same java code
different output trying to execute
same java code i am using net beans 7 ide and
java 6 to develop my
java projects. i used the following coding... " portList : false"
Why there is
different output trying to execute
same java
Java example program to get the object's ID
Java example
program to get the object's
ID
java get Object
id
In
java there is no any specific method that provides
us the object's
ID. But
each object
has its own unique
Java Vs Script
;
The Java and
Java Script are completely
different from each other...
different in creating an application that they run.
Java is a complex
object... to prevent
from hacking. All this feature of
java make it 1000 times better and securable
java program for me to see who are on my server
java program for me to see
who are on my server Hello,
Im a beginner in
java, doing some tutorials and stuff.
I wanna write a
java program to put on my server where i wanna see if like 3 people are on my server PLUS that i want
Who has the best AI?
Who has the best AI? Hi,
I am beginner in Data Science and machine learning field. I am searching for
the tutorials to learn:
Who has the best... the
topic "
Who has the best AI?". Also tell me which is the good training
Delete row and column from table through java code
Delete
row and column
from table through
java code... will see how to delete
row and
column
from given table through
java code.
Java code... will delete the
row having minimum
value of
ID then delete the column named
delete row using id
= "delete
from Insurance insurance where
id = 2";
Query query = sess.createQuery...: delete [delete
from pkg2.Insurance insurance where
id = 2...delete
row using id package pkg2;
import org.hibernate.Query;
import