Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle counts the respective rows of all tables under a user

Shulou Source: shulou.com Published: 2022-06-01 05:52:39 10月07日 Update

Set serveroutput on

Declare

T_count number (10)

T_str VARCHAR2 (500)

Cursor t_tables is select table_name from user_tables

Begin

For t_row in t_tables loop

T_str: = 'select count (*) from' | | t_row.table_name

Execute immediate t_str into t_count

Dbms_output.put_line (t_row.table_name | |'='| | to_char (t_count))

End loop

End

Tags: Users statistics Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Huawei Redmi Microsoft Shulou Tech Info