Can we get the list of table names in a particular database(MS Access)? ie; I need a query which is similar to select * from dual; which works in Oracle
Paul Bergin
Greenhorn
Joined: Sep 27, 2002
Posts: 2
posted
0
If you want to get a slist of table names back to Java this is how it can be done //open connection to database con = DriverManager.getConnection(url, userName, password); //get db meta data DatabaseMetaData db = con.getMetaData(); //get ResultSet of table names ResultSet tablesDbMetaData = db.getTables(null,dsn,"%",types); //loop through result set and get print table names while(tablesDbMetaData.next()) { tableName = tablesDbMetaData.getString("TABLE_NAME"); System.out.println("tableName = "+tableName); }
Originally posted by donepudi: Can we get the list of table names in a particular database(MS Access)? ie; I need a query which is similar to select * from dual; which works in Oracle
select * from dual gives you a list of table names in Oracle?
donepudi madhu
Greenhorn
Joined: Sep 25, 2002
Posts: 11
posted
0
Originally posted by Michael Matola:
select * from dual gives you a list of table names in Oracle?
Sorry sir, it was told by my friend when I posed this query.