I tried below query :
select table_name, to_number(extractvalue(xmltype(dbms_xmlgen.getxml(‘select count(*) c from ‘||table_name)),’/ROWSET/ROW/C’)) as count from user_tables
But, I am getting following error.
ORA-00911: invalid character 00911. 00000 - "invalid character" *Cause: identifiers may not start with any ASCII character other than letters and numbers. $#_ are also allowed after the first character. Identifiers enclosed by doublequotes may contain any character other than a doublequote. Alternative quotes (q'#...#') cannot use spaces, tabs, or carriage returns as delimiters. For all other contexts, consult the SQL Language Reference Manual. *Action: Error at Line: 76 Column: 52
I am new to oracle. So, Can anyone please let me know the possible way to get the exact row count of all the tables in particular schema.
P.S. I tried below query for all_tables. But, I got to know that the below query is based on the statistics and it may not give exact result.
select owner, table_name, num_rows,LAST_ANALYZED from all_tables where OWNER = 'XYZ' and TABLE_NAME = 'APPLICATION' order by table_name asc;