Monday, October 23, 2017

Query to List all Empty Tables

  SELECT    'select '''
         || owner
         || ''' owner,'''
         || table_name
         || ''' table_name  '
         || CHR (10)
         || 'FROM '
         || owner
         || '.'
         || table_name
         || ' where rownum<2 having count(*)=0; '
            sql
    FROM all_tables
   WHERE     owner NOT IN ('SYS',
                           'SYSTEM',
                           'OUTLN',
                           'WMSYS')
         AND SUBSTR (owner, 1, 4) <> 'OPS$'
ORDER BY 1;

No comments:

Post a Comment

currentAppUi built in variable in VBCS

$global.currentAppUi.id :- The id of the App UI $global.currentAppUi.urlId :-The id of the App UI as shown in the URL $global.currentAppUi.d...