Geethandh K

Greenhorn
+ Follow
since Aug 17, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Geethandh K

Thank you very much Mr.Jamie. It worked well.
Please help me. Cen we execute a resultset in another resultset? the sample code is here.
import java.sql.*;
class Employee
{
public static void main (String args []) throws SQLException
{
try
{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection ("jdbc racle:thin:@127.0.0.1:1521 rcl","scott", "tiger");
Statement stmt = conn.createStatement ();
Statement stmt1 = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select empno, ename from emp");
while (rset.next ())
{
int eno = rset.getInt(1);
String enm = rset.getString(2);
System.out.println (eno+"----"+enm);
ResultSet rs = stmt1.executeQuery("select sal from emp where empno = "+eno);
System.out.println (rs.getInt(1));
}
}
catch(Exception e)
{
System.out.println(e);
}
}
}