SQL

By kimot, 24 December, 2022
SELECT A.AUTL as user1, B.AUTL as user2
FROM (SELECT autl
      FROM QSYS2.AUTHORIZATION_LIST_USER_INFO
      WHERE user_name = 'profile_1')  A
FULL OUTER JOIN (SELECT autl
      FROM QSYS2.AUTHORIZATION_LIST_USER_INFO
      WHERE user_name = 'profile_2')  B 
ON A.AUTL = B.AUTL;
By kimot, 24 December, 2022
SELECT DATA_SIZE,SYSTEM_TABLE_NAME, SYSTEM_TABLE_SCHEMA,NUMBER_ROWS, NUMBER_DELETED_ROWS              
       FROM QSYS2.SYSTABLESTAT                 
       WHERE SYSTEM_TABLE_SCHEMA = 'Library_name'
       ORDER BY NUMBER_DELETED_ROWS DESC       

 

By kimot, 22 December, 2022
SELECT system_table_member                                
FROM sysibm/syspstat
WHERE system_table_schema = 'LibraryName' AND system_table_name = 'FileName'