Thanks Bryan. 
I referred to the below API and could get reference to get foreign key and 
primary key table. 

Anjana. 

-----Original Message-----
From: Bryan Pendleton [mailto:[email protected]] 
Sent: Friday, December 11, 2015 7:57 PM
To: [email protected]
Subject: Re: Query to fetch table name based on their constaints

On 12/11/2015 3:56 AM, Anjana Prakash wrote:
> Hi ,
>
> Has anyone tried to retrieve table name based on their constraints.

Often you can do this sort of thing using JDBC's DatabaseMetaData:

http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html

Alternately, have a look at the Derby system tables, which you can write 
arbitrary queries against:

http://db.apache.org/derby/docs/10.11/ref/rrefsistabs38369.html

bryan


Reply via email to