3 Replies Latest reply: Jan 10, 2012 6:01 AM by 894085 RSS

    How to retrive table names with Java?

    406028
      Hello!

      If I connect to my Oracle Database 10g Express Edition Instance with some Java code and I run the following code:

                     ResultSet resultSet = databaseMetaData.getTables(null, null, "%", types);
                     while( resultSet.next() )
                     {
                          String tableName = resultSet.getString(3);
                          System.out.println(tableName);
                          
                     }

      I get loads of different names of tables beside those that belongs to my user like:
      ...
      DR$NUMBER_SEQUENCE
      DR$OBJECT_ATTRIBUTE
      DR$POLICY_TAB
      ARTICLES
      BIN$tQZXQ0iGufbgQAB/AQELFg==$0
      BIN$tQZXQ0iLufbgQAB/AQELFg==$0
      ...

      But when I log in to http://127.0.0.1:9090/apex I get a perfect list of the tables belonging to the user:
      ARTICLES
      CUSTOMERS
      DATATYPES
      ORDERROWS
      ORDERS
      REQUESTROWS
      REQUESTS
      SUPPLIERROWS
      SUPPLIERS

      Does any one understand how to access just these table names that is created with my user?

      Best regards
      Fredrik