Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005

    Unanswered: JDBC API to fetch only user tables


    I am using JDBC DatabaseMetaData's getColumns() to get the table names, column names and datatype of the columns. As a result, I am getting user tables as well as the system tables. How to fetch only the user tables excluding the system tables like sysindexes, etc. I know this is possible by executing a select query (using SYSOBJECTS and xtype = 'U'). But, is there anyway to fetch only the user tables using the databasemetadata API.

    Please advice,


  2. #2
    Join Date
    Jun 2003
    create a result set of DatabaseMetaData.getTables() first.In this method u can specify TABLE_TYPE.
    Use this result set to run DatabaseMetaData.getColumns() in a loop.
    I love cursor,though I never use it.Cos' I dont want to misuse it.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts