-2

For data profiling purpose , I just need to get the idea if a columns in a given table has values populated or not. For that, I need to get the list of columns and distinct value counts for a given db2 table.

Edayadulla M
  • 101
  • 2
  • 4
  • 1
    Hi Edayadulla, welcome to StackOverflow. Please include what code you have tried, and the specific question you have. I recommend reading through https://stackoverflow.com/help/how-to-ask and updating your answer accordingly – Brydenr Dec 17 '19 at 18:16
  • 1
    What is your Db2-server platform (Z/OS, i-series, Linux/Unix/Windows). The answer differs per platform... – mao Dec 17 '19 at 18:27

1 Answers1

0

If you are using Db2 for Linux, Unix or Windows you could try

SELECT TABSCHEMA, TABNAME, COLNAME, COLCARD FROM SYSCAT.COLUMNS
Paul Vernon
  • 3,818
  • 1
  • 10
  • 23