select table_name,
to_number(
extractvalue(
xmltype(
dbms_xmlgen.getxml(
'select count(*) c from '||table_name
))
,'/ROWSET/ROW/C')
) count
from user_tables
order by table_name;
Run Code Online (Sandbox Code Playgroud)
我知道它给出了每个表的行总数。但如何知道它是如何工作的呢?