Not all columns show up on select * on DB2 for IBM i 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.

SELECT
        col1, col2.col3, fxcolid
    FROM  lib.table


I'm using the jt400 driver to query from SQLWorkbench/J.
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.