I am querying following sys tables to get the check constraint information for particular column.
select colname,tabname,constrname
from sysconstraints A, systables B, syscolumns C
where tabname = 'sarorders'
and B.tabid = A.tabid
and B.tabid = C.tabid
and constrtype = 'C'
and colname = 'sotype';
colname tabname constrname
sotype sarorders c160_214
sotype sarorders c160_215
sotype sarorders c160_216
sotype sarorders c160_473
But sotype column should have only one check constraint
CONSTRAINTS - sarorders: Reference Primary Check Unique Defaults Exit
Display check constraints.
----------------------- lnp_160@colt_tcp ------- Press CTRL-W for Help --------
Constraint name Value
c160_214 (sofieldeditflag IN ('T' ,'F' ))
c160_215 (somangenflag IN ('T' ,'F' ))
c160_216 (solautorevflag IN ('T' ,'F' ))
c160_473 (sotype IN (1 ,2 ,3 ,4 ,5 ))
What's wrong with my query? Thanks in advance Sh