Check constraints listing
Posted in 2000
Topics: Stored Procedures & SPL, Triggers, Constraints & Referential Integrity
Before I reinvent the wheel, does anyone have a query, or, more likely, stored procedure which vomits back all check constraints in a database, preferably by table and column? I don't have ISQL so can't use ACE reports. I've looked through the IIUG software suppository but couldn't find anything there.
Red Valsen wrote:
> Before I reinvent the wheel, does anyone have a query, or, more likely,
> stored procedure which vomits back all check constraints in a database,
> preferably by table and column? I don't have ISQL so can't use ACE
> reports. I've looked through the IIUG software suppository but couldn't
> find anything there.
select tabname, seqno, checktext
from systables st, sysconstraints sc, syschecks ck
where st.tabid = sc.tabid
and sc.constrid = ck.constrid
and constrtype = 'C'
and type = 'T'
order by 1,2,3;
This will get you the text and the tabname. The colname is embedded in the
text.
Art S. Kagel