aspose file tools
The moose likes JDBC and the fly likes get primar key and foreign keys from table Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

get primar key and foreign keys from table

waleed atef abdel elazyz
Greenhorn

Joined: Nov 01, 2004
Posts: 13
Dear all,
I have aproblem how to get primary key and foreign key from table

and relation between tables.

please explain code
thanks and best regards
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1112

Waleed,
Pardon me if I am stating the obvious, but I believe the java.sql.DatabaseMetaData interface is what you need.

Good Luck,
Avi.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56151
    
  13

waleed, please do not post the same question more than once.

bear
forum bartender


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get primar key and foreign keys from table
 
Similar Threads
insert data into 2 tables using HQL
EJB3 in Action page 255
Entity beans which map two tables with foreign key pointing to alternate key (not primary key)
Unique constraint issue ...
Please help with Relationships of Beans !