The JoinRowSet is used to hold the data coming from two or more tables. It can be achieved by using the join in sql. The JoinRowSet has equivalent of an SQL JOIN without having to connect to a data source In order to get the joined data one column in both tables should be common. The common column is known as the match column. The match column is set by calling the addRowSet() method for each RowSet object with the column index and the RowSet objects which you want to join. The following code will illustrate the use of the JoinRowSet.
package com.visualbuilder; import javax.sql.rowset.CachedRowSet; import com.sun.rowset.CachedRowSetImpl; public class JoinRowSetExample { Ouput:- Employee is Adam Department is Sales Employee is Susan Department is Account Employee is Adran Department is Marketing Employee is Hardy Department is Marketing Employee is Tim Department is Account Employee is Michael Department is Sales | |
Java Discussion
- - Interviewing Next week -
- - Sudoku solver
- - Setting tab order in swin
- - Java opportunities
- - Struts



