If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 Command Editor Connecting with JDBC

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-09, 18:05
Demosthenes Demosthenes is offline
Registered User
 
Join Date: Oct 2009
Posts: 1
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.
Reply With Quote
  #2 (permalink)  
Old 10-26-09, 19:34
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On