Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Updating rows who has same id with different values for each row from java program
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


suresh anugandula
Updating rows who has same id with different values for each row from java program
0 Answer(s)      3 years and 4 months ago
Posted in : Java Beginners


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.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Updating rows who has same id with different values for each row from java program
Updating rows who has same id with different values for each row from java...) with "lalitha" as a value for sname column from java program. Same for records with sid... rows with same id. student table: sid sname age 2 aruna 25 2
updating rows which contains same id, different value for each row
updating rows which contains same id, different value for each row  ... 30 From the above table we can identify that 4 rows with sid 1 and 3 rows with sid 5. Like this table may contains multiple records with same sid
Advertisements
Java Program to insert a row in the same sheet of excel file
Java Program to insert a row in the same sheet of excel file  Java program to insert a row in the same sheet of excel file using poi package in java
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
how to get values for same column name from two different tables in SQL
how to get values for same column name from two different tables in SQL  how to get values for same column name from two different tables in SQL???? column name is emp_id loacated in these two tables company,employee
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<
Set Different Color to different row in Java Program
Java Set Different Color to different row In this section, you will learn how to set different color to table row using java swing.For this purpose, we have... color to different row. Here is the code: import javax.swing.*; import
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 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
How to print different Messge for the same NumberFormatException on different cause objects in JAVA?
How to print different Messge for the same NumberFormatException on different cause objects in JAVA?  How to print different Messge for the same NumberFormatException on different cause objects in JAVA? try { int
java program of different shapes
java program of different shapes  pls help me to get the code of a java program of different shapes using menu
how to read the values for text and csv files and store those values into database in multiple rows..means one value for one row
or .txt) file and get the values from that file and store them into database table in multiple rows(which means one value for one row). eg: my file containes... row.... can any one help in this program? Regards, P.Divya   hi
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
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
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
Insert specific fields into table dynamically for each row.
Insert specific fields into table dynamically for each row.  ... insert there for each row and for each row there is a button "done".if he click on done the values will be inserted into database.Then he enter values for next row
Insert specific fields into table dynamically for each row.
Insert specific fields into table dynamically for each row.  ... insert there for each row and for each row there is a button "done".if he click on done the values will be inserted into database.Then he enter values for next row
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
how to run java program that has several classes under package from usb drive?
how to run java program that has several classes under package from usb drive... command line and it works. I copied all java files and class files to flash drive... classes are Circle, Point, PlaneCircle, EHashtable, CHashtable in the same
how to mark different colors for diffent rows - Java Beginners
how to mark different colors for diffent rows  Hi, i have drawn a simple table using swings and now i want to mark diffent colors for each row..............my target is to have each color for each row.......first row
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
how to mark different colors for diffent rows - Java Beginners
how to mark different colors for diffent rows  Hi frends, Actually yesterday i had a question that, how can i mark colors to my rows in the table... in that frame...........only the table with colord rows is getting....... My
how to Insert Array Values Into Separate Rows using java?
how to Insert Array Values Into Separate Rows using java?  how to Insert Array Values Into Separate Rows using java?  class InsertArrayValuesInSeparateRow{ public static void main(String[] args
how to add the two tables in same row when generating pdf file from jsp - JSP-Servlet
how to add the two tables in same row when generating pdf file from jsp  How to add the two tables in same row one is left side and other is right side please help me.   Hi Friend, Try the following code
JTable duplicate values in row
JTable duplicate values in row  JTable duplicate values in row
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
Want to display Arraylist items on same row in JSF
Want to display Arraylist items on same row in JSF  I want do display values of one arraylist on same row using datatable? If i use h:column, then it goes on different row. Please tell me, how I can do it?   Hi Friend
redirecting a login authenticated form to a form to be displayed on the same page from where the login authentication has taken place.
redirecting a login authenticated form to a form to be displayed on the same page from where the login authentication has taken place.  I am...,whisch is a different page altogether. Please Help Urgently.   
 

 

 

DMCA.com