Red Hat AS 2.1
DB2 WSE v8.1 FP5
Type 4 DB2 JDBC driver
Using java.sql.DatabaseMetaData and ResultSetMetaData,
I've written a JDBC/Java utility that shows, table by
table, columns & their types, NOT NULLness, PK, FK,
and unique indexes.
But one thing that I can't seem to extract is info
about what column(s) are DB2 IDENTITY columns.
Anyone have any ideas on how I can do this JDBC-wise?
TIA
aj 3 3733
"aj" <ro****@mcdonalds.com> ???? news:10*************@news.supernews.com... Red Hat AS 2.1 DB2 WSE v8.1 FP5 Type 4 DB2 JDBC driver
Using java.sql.DatabaseMetaData and ResultSetMetaData, I've written a JDBC/Java utility that shows, table by table, columns & their types, NOT NULLness, PK, FK, and unique indexes.
But one thing that I can't seem to extract is info about what column(s) are DB2 IDENTITY columns.
Anyone have any ideas on how I can do this JDBC-wise?
TIA
aj
I think that you can check SYSCAT.COLIDENTATTRIBUTES catalog view, which
contains each identity column defined.
I appreciate your reply - however I was looking for a JDBC API
way to do this, rather than something that is specific to DB2.
That way, my code is not chained to a specific database...
Any other ideas?
aj
XiaoLu Wang wrote: "aj" <ro****@mcdonalds.com> ???? news:10*************@news.supernews.com...
Red Hat AS 2.1 DB2 WSE v8.1 FP5 Type 4 DB2 JDBC driver
Using java.sql.DatabaseMetaData and ResultSetMetaData, I've written a JDBC/Java utility that shows, table by table, columns & their types, NOT NULLness, PK, FK, and unique indexes.
But one thing that I can't seem to extract is info about what column(s) are DB2 IDENTITY columns.
Anyone have any ideas on how I can do this JDBC-wise?
TIA
aj
I think that you can check SYSCAT.COLIDENTATTRIBUTES catalog view, which contains each identity column defined.
Can you access "extended describe" information? I know that CLI exposes
this information through extended/full describe. So the stuff is lying
around. Question is whether it's in the JDBC interface.
Cheers
Serge This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Swami |
last post by:
Hi,
I have installed MQ SQL Server 2000 on my laptop and trying to use
SPRINTA 2000 JDBC Driver (inetmssql.jar) to connect to the local db. I
wrote a sample Java app to test the connection and I...
|
by: Dov Moryusef |
last post by:
Hi to all,
I’ve a table with an idendity column :
CREATE TABLE USRDB2.MYTABLE (
"ID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 0,
INCREMENT BY 1, NO CACHE),
"CODE"...
|
by: Maroon |
last post by:
import java.sql.*;
public class TESTA{
TESTA(){}
public static int product() {
try {
Class.forName("com.ibm.db2.jcc.DB2Driver");
|
by: Ying Lu |
last post by:
Hello,
Under mysql, we have "desc tablename" to get the detail information
about a table. My question is about to get column name, and column type
for a specific table under PostgreSQL through...
|
by: Joe Weinstein |
last post by:
Hi. Below is a simple JDBC program to insert and extract
a numerical value. When ResultSet.getDouble() is called,
the same program produces different output on solaris
than it does on Linux. I...
|
by: drudini |
last post by:
We have installed DB2UDB 8.2 on a windows 2003 server. How can I
confirm the version of the JDBC driver that would have been installed
with this? I wasn;t sure if the JBDC driver would have a...
|
by: Pete Geraghty |
last post by:
I want to use DatabaseMetadata to retrieve details of those stored procedures which belong to the current schema. How can I find out what is the current schema for an existing Connection?
Or...
|
by: dvawdrey |
last post by:
Can someone help me please with the following code:
try {
DatabaseMetaData metadata=con.getMetaData();
System.out.println(metadata.getDriverName());
System.out.println("Driver version:...
|
by: bergy |
last post by:
I am writing on an embedded device (J9 framework from IBM) that has a partial version of the java.sql package. It does not include Driver or DriverManager. I have downloaded the mysql Connector/J...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |