开发者

How to see a foreign key name in DB2 through command line

开发者 https://www.devze.com 2023-03-21 23:38 出处:网络
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.

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
0

精彩评论

暂无评论...
验证码 换一张
取 消