Thread: enquiring
is there any JDBC-API for finding the primary key & foreign key of a table ? _________________________________________________________ Click below to visit monsterindia.com and review jobs in India or Abroad http://monsterindia.rediff.com/jobs
Yes, use DatabaseMetaData. You can obtain it from Connection object:
Connection con;
...
DatabaseMetaData mtd = con.getMetaData();
And then use methods like getPrimaryKeys(...), getCrossReeference(...), getExportedKeys(...), getImportedkeys(...) etc. See Java API.
Hoanui
--- On Tue 05/14, ganaraj k wrote:
> is there any JDBC-API for finding the primary key & foreign key of
> a table ?
> _________________________________________________________
> Click below to visit monsterindia.com and review jobs in India or
> Abroad
> http://monsterindia.rediff.com/jobs
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo@postgresql.org)
>
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
Connection con;
...
DatabaseMetaData mtd = con.getMetaData();
And then use methods like getPrimaryKeys(...), getCrossReeference(...), getExportedKeys(...), getImportedkeys(...) etc. See Java API.
Hoanui
--- On Tue 05/14, ganaraj k wrote:
> is there any JDBC-API for finding the primary key & foreign key of
> a table ?
> _________________________________________________________
> Click below to visit monsterindia.com and review jobs in India or
> Abroad
> http://monsterindia.rediff.com/jobs
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo@postgresql.org)
>
Join Excite! - http://www.excite.com
The most personalized portal on the Web!