My client has a table on their IBMi with a foreign key to another table. It's not showing up with a SELECT * FROM lib.table. However, if I specifically mention it in the column list. It does show up.

        col1, col2.col3, fxcolid
    FROM  lib.table

I'm using the jt400 driver to query from SQLWorkbench/J.

2 Answers 2


There is an IMPLICITLY HIDDEN column attribute that can be applied. Please check for this...

This means the column will only appear when it is explicitly specified on the SELECT statement.

Check the CREATE TABLE statement for this property, or materialize the TABLE's DDL using some API or tool, such as RTVSQLSRC.

  • I was stupid. It was actually long (what shows up in STRSQL results on the green screen) versus short table names. See my self answer. Commented Sep 23, 2015 at 18:38

It appears to be long column name versus short column name. Upon closer inspection the hidden column always had the same value as an unhidden one. Since the long name in this case was abbreviated and cryptic, I didn't make that connection right away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.