• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting only Tables with out Views using getTables()

 
Tauri Valor
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to get only the tables to be retrieved using getTables() of DatabaseMetaData..Pls let me know how can I restsrict the views ?

Thanks,
Sud
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

public ResultSet getTables(String catalog,String schemaPattern,String tableNamePattern,String[] types) throws SQLException



This is the signature of getting tables on DatabaseMetaData.In the types which is string array you can provide you filter option to limit the results.

In your case , do the following



pass this type to your method and you will get desired result

Shailesh
 
Tauri Valor
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shailesh

Im doing just the same...




Pls let me know where Im going wrong..

Thanks,
Sudheer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic