Oracle查看某个用户下的所有空表
今天在群里有人问如何查看某个用户下的所有空表,有人回答是写PL/SQL
SQL> exec dbms_stats.gather_schema_stats(user);PL/SQL 过程已成功完成。SQL> select table_name,num_rows from user_tables;TABLE_NAME NUM_ROWS------------------------------ ----------T_FILE_INFO_RAW 0T_DOSSIER_INFO_RAW 0T_FONDS_INFO_RAW 8SQL> select count(*) from T_FONDS_INFO_RAW;COUNT(*) 8
这种方法要比写PL/SQL方便得多