db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Narayanan <V.Naraya...@Sun.COM>
Subject Re: How to retrieve the constraints associated to a table
Date Tue, 27 May 2008 06:04:21 GMT
fporto wrote:
> Hi,
>  I'm receiving the following message when trying to drop a table:
> ERROR X0Y25: Operation 'DROP CONSTRAINT' cannot be performed on object
> 'SQL080516103912600' because CONSTRAINT 'SQL080525110646121' is dependent on
> that object.
> I would like to obtain the list of constraints associated to each of my
> tables.
> I've tried to use the Describe SQL command but it doesn't print constraint
> info.
> I've also tried to query system tables:sysconstraints, sysdepends but
> couldn't find the objects referred to in the msgs.
> Can someone there help me on this?
> cheers,
> Fabio.
I tried this

 select CONSTRAINTNAME from sys.SYSCONSTRAINTS,sys.systables where 
sys.systables.tablename='NARAYANAN' and 

Replace the tablename with the name of the table for which you want to 
find the constraints.


View raw message