I have some table name in one CSV file at client side.
once you get list of tables name from input CSV file at client side.
Need to run one query to know total rows and size of table in MB , this i need to repeat for all tables which i got from input file.
finally write 'table name | total rows | size of table in MB' whole info in another CSV file at client side. this output CSV file name will contain timestamp.
Please guide me in detail how to read and write file avail at client side.
This is a simple SQL question and this forum is for SQLDEveloper, however, this is a question for our SQL*Plus support which can help with this.
set FEEDBACK off
set head off
--Gather stats to populate rownums and avg length of rows.
--These are not exact sizes (obviously) but you get the idea.
select TABLE_NAME||','||NUM_ROWS||','||ROUND((NUM_ROWS*AVG_ROW_LEN)/(1024*1024)) CSV
where num_rows is not null order by num_rows desc;