We need to identify whether a field is part of a key / index from a table.
I like to get that information by running an SQL query.
How can I do that?
You can run this SQL query:
SELECT RECORD_NAME , AUTHID , AGR_SQLNAME , DATACOM_NAME, DATACOM_ID FROM SYSADM.KEY
WHERE ENABLE = 'Y' AND STATUS = 'P' AND KEY_TYPE = 'I' AND
RECORD_NAME = 'your record name' AND ( KY1FLDNM = 'your field' OR KY2FLDNM = 'your field' OR KY3FLDNM = 'your field' OR KY4FLDNM = 'your field')
DATACOM_NAME is the name of the key.