For Programmers: Free Programming Magazines  


Home > Archive > Java Databases > September 2005 > finding CHECK constraint with DatabaseMetaData









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author finding CHECK constraint with DatabaseMetaData
dom

2005-09-26, 6:56 pm

How to find with DatabaseMetaData the check constraints on a table ?

ALTER TABLE T_DISTAN ADD CONSTRAINT CHECK_DISTAN_PDL1_PDL2
CHECK (NO_PDL1 != NO_PDL2);

I can find FOREIGN KEY, UNIQUE AND PRIMARY KEY

Lee Fesperman

2005-09-26, 6:56 pm

dom wrote:
>
> How to find with DatabaseMetaData the check constraints on a table ?
>
> ALTER TABLE T_DISTAN ADD CONSTRAINT CHECK_DISTAN_PDL1_PDL2
> CHECK (NO_PDL1 != NO_PDL2);
>
> I can find FOREIGN KEY, UNIQUE AND PRIMARY KEY


Sorry, DatabaseMetaData doesn't support retrieval of CHECK constraints. You'll need to
use capabilities native to your DBMS for retrieving this information from the catalog.

--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
========================================
======================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com