sqldb2ibm-midrangedb2-400

Describe is not working in IBM DB2


I am running an query in IBM DB2 as;

DESCRIBE TABLE Schema.Table

But I am getting an error as

DESCRIBE TABLE Schema.Table Error 42601:Token Table was not valid. Valid tokens: :. SQLCODE=-104

I search a lot but can't find out the reason and as I am very new in IBM DB2 so can't figure out the matter. Is it a permission related issue?

I don't have command prompt access.


Solution

  • You appear to be using DB2 on IBM i (formerly known as AS/400), where catalog views are in the QSYS2 schema.

    In recent versions there are also their equivalents: SYSIBM.SQLCOLUMNS and INFORMATION_SCHEMA.COLUMNS.