如何在 DB2 中查找表的主键的名称和值 [英] How to find the name and value of a table's primary key in DB2
本文介绍了如何在 DB2 中查找表的主键的名称和值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何查找表的主键列名和值?我已尝试查看 SYSCAT 表,但在此找不到任何内容.
How can I find the primary key column name and value of a table? I have tried looking in the SYSCAT table but cannot find anything on this.
推荐答案
这应该可以满足您在大型机上的需求:
This should give you what you need on mainframe:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH11/E.8?DT=20010718164132
DB2 10 Z/OS:
DB2 10 Z/OS:
功能:
SQLPrimaryKeys()
http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/odbc/src/tpc/db2z_fnprimarykeys.html
这篇关于如何在 DB2 中查找表的主键的名称和值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文