Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

get size of an empty column in oracle

Hi there,

 I have a heap of tables in a new database that are all blank with some changes dripping in every now and again to the design.

I want to get the size in bytes of the columns in each table... not the length of the data in the column as there is none. So I need to add up the size of number, size of nvarchar 100 etc for a table.  I can only see Avg row size and functions to give me the size of data contained in the row.

PS.. a nice cursor or something that would take in table names and do this would be cool

thanks M
0
MickyMc
Asked:
MickyMc
  • 3
  • 2
2 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
would you be happy querying this system view:
http://ss64.com/orad/DBA_TAB_COLUMNS.html

which has the information you are asking for?
0
 
MickyMcAuthor Commented:
ok,

I did this but not sure if its correct...

select TABLE_NAME, SUM(DATA_LENGTH) from all_tab_Columns
where TABLE_NAME like 'New_%'
GROUP BY TABLE_NAME

I use Like 'New' as all the new tables are prefixed with this but later this will be removed...

Is this the correct way to do it... thanks M
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
yes, that sounds like a good start :)
0
 
MickyMcAuthor Commented:
Cool Angel... this was easier than working out the data size in a row..lol  so this is correct... if so I will award the points... thanks for the link...rgds m
0
 
MickyMcAuthor Commented:
thanks Angel
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now