-
Hi there,
I have created a temporary table which has "Table_Name" and "Count" columns.
What I want to do is automatically populate this table with each table name in the database (not sys or system) and it's row count, from that I can create a truncate statement easily.
The statement I am trying to get to work is:
'select 'select count(*), table_name from '||owner||'.'||table_name||';' from dba_tables
where owner not in ('SYS','SYSTEM');
I know that eventually this will turn into an 'update table ....' statement but at the moment I am just trying to get this bit to work.
I'm sure that this could be done using PLSQL but I want to do it with pure SQL
Any advice would be greatly appreciated
Many thanks
Alison
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|