关于JDBC,如何执行嵌套数据库的查询
展开全部
这个能通过了:
import java.sql.*;
class MyLogger {
public static void main(String args []){
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@172.18.8.4:1526:oracle9i", "scott", "tiger");
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select * from eddie_fee");
while (rset.next ()){
String aa=rset.getString(1);
Statement stmt1 = conn.createStatement ();
ResultSet rset2 = stmt1.executeQuery ("select * from eddie_fee where name='" + aa+ "'" );
}
}
catch(Exception e)
{
System.out.print("error");
}
}
}
import java.sql.*;
class MyLogger {
public static void main(String args []){
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@172.18.8.4:1526:oracle9i", "scott", "tiger");
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select * from eddie_fee");
while (rset.next ()){
String aa=rset.getString(1);
Statement stmt1 = conn.createStatement ();
ResultSet rset2 = stmt1.executeQuery ("select * from eddie_fee where name='" + aa+ "'" );
}
}
catch(Exception e)
{
System.out.print("error");
}
}
}
ZESTRON
2024-09-04 广告
2024-09-04 广告
在Dr. O.K. Wack Chemie GmbH,我们高度重视ZESTRON的表界面分析技术。该技术通过深入研究材料表面与界面的性质,为提升产品质量与可靠性提供了有力支持。ZESTRON的表界面分析不仅涵盖了相变化、化学反应、吸附与解吸...
点击进入详情页
本回答由ZESTRON提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询