0

I used the following command to obtain the count of each table rows in a schema in oracle 11g. To do the same in postgres what changes should be made? D6 is the schema name

Query:

select
table_name,
to_number(
   extractvalue(
      xmltype(
         dbms_xmlgen.getxml('select count(*) D6 from '||table_name))
,'/ROWSET/ROW/D6')) count
from user_tables;


Error:

ERROR:  relation "user_tables" does not exist
LINE 8: from user_tables;
             ^


********** Error **********

ERROR: relation "user_tables" does not exist
SQL state: 42P01
Character: 163

The following error is displayed. What changes shall be made?

Reenu Rahman
  • 33
  • 2
  • 3
  • 10

0 Answers0