首页 > 编程知识 正文

java数据库多表查询,java判断数据库表是否为空

时间:2023-05-06 18:41:16 阅读:61886 作者:4881

java.sql.Connection Conn;

java.sql.Statement Stmt;

java.sql.ResultSet Rst;

string con _ string=' JDBC : MySQL ://localhost 33603306 ';

con_string=con_string '/soft? 用户=Java user; password=javadude ';

class.forname (com.MySQL.JDBC.driver );

conn=驱动程序管理器. getconnection (con _ string );

//class.forname (sun.JDBC.odbc.jdbcodbcdriver );

//string URL=' JDBC : odbc : LSD ';

//connection con=驱动程序管理器. getconnection (URL;

databasemetadatadbmd=conn.get metadata (;

//resultset RS=dbmd.get tables (null,null,' news ',null );

wile(RS.next ) ) }

out.print (' table-name : ' RS.getstring ) )3)。

();

}

%

table-name :管理员

table-name: count_num

table-name: good

table-name: jivethreadaddon

table-name: soft

table-name: tuijian

table-name :类型

table-name: type_parent

posted on 2007-12-25 12:45卢恩迪读书(1473 )评论(0)编辑收藏

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。