Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009

    Unanswered: DB2 Command Editor Connecting with JDBC

    Hi, I noticed there are certain commands I can't pass to DB2, using JDBC to a DRDA server. Among these are:

    List Tables

    I am currently using

    describe select * from ....

    ... instead, but I want to find more information, such as NOT NULL fields.

    Is there another command or other way get this information? I work in a pretty locked down environment, and I'm new to DB2, coming from a SQL Server and Oracle background.

    Thanks, Everyone.

  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    You've nailed it. "list tables" is a CLP command, not an SQL statement. You can only issue SQL statements via JDBC (or any other interface, other than CLP).

    You can obtain catalog information from, well, the catalog views: syscat.tables, syscat.columns, etc. The catalog views are well documented in the manual.
    "It does not work" is not a valid problem statement.

Posting Permissions

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