Originally posted by MohanRaj Gurubatham: Hi, Could any one help me with code to list all the tables in a connected database. Thanks in advance. MohanrajG
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
MohanRaj Gurubatham
Greenhorn
Joined: Sep 05, 2001
Posts: 16
posted
0
Originally posted by Bosun Bello: This worked for me. You may need to tweak it a little bit to suit your needs.
Bosun
Thank you verymuch Bosun. It is working for me also without chaning anything. I was trying with the following code for MySQL ResultSet rs1=stmt.executeQuery("show tables"); while(rs1.next()) { System.out.println("Tables.....:"+rs1.getString(1)); } But it is vendor specific where as the solutions which you gave is general. I really appriciate you. With Regards MohanRajG
Thankyou Very Much Bosun Bello This code [tables] is working fine. i used that one. I have a doubt. How to display no of tables existed in Database[tablecount] if possible pl send me a sample code thanks inadvance yours Suji N