Retrieving a tables description
843859May 9 2006 — edited May 10 2006hi all
im designing an application which retrieves the tables stored in the database and displaying its contents and its description
As of now im using the ResultSetMetaData class to display the description about the table like the column names and its size
i have tried to do it by executing the query " desc tablename " ??
ex : Statement st = dataconnection.createStatement();
ResultSet rs = st.executeQuery("desc tablename");
while(rs.next())
{
String columnname[0] = rs.getString(1);
}
its showing invalid SQL statement error ,
so i got a doubt whether i can execute like that ??
if so ,how to do it ??
thnx in advance
keon