How to see a foreign key name in DB2 through command line
I am facing problem to see the foreign key name. In db2cc i can see from the table list w开发者_开发问答ith alter option. But i want to know how can we see from command line. To drop that foreign key.
select constname from SYSCAT.REFERENCES where TABNAME = '<your table>';
select substr(tabschema,1,16) as tabschema, substr(tabname,1,16) as tabname, keyunique
from syscat.tables
where keyunique > 0
精彩评论