Home » SQL & PL/SQL » SQL & PL/SQL » Max Length for a column (Oracle11)
Max Length for a column [message #574275] Tue, 08 January 2013 08:58 Go to next message
bella13
Messages: 90
Registered: July 2005
Member
Hi,
I want to find the max length for a coulumn in oracle, without querying each of the columns.
Are these stats stored somewhere?
I have several fields defined as varchar2(4000). Not all of them use up 4000. Instead of querying each one ..max(coumnname) i want to explore if there is a way, i can find the max size stored somewhere? dba_tab_cols provides size of the field. is there any table that provides max used so far?
any help is appreciated.
thank you
Re: Max Length for a column [message #574276 is a reply to message #574275] Tue, 08 January 2013 09:01 Go to previous message
BlackSwan
Messages: 21948
Registered: January 2009
Senior Member
>is there any table that provides max used so far?
no
you will need to issue SELECT MAX(LENGTH(COL1) FROM TABLE1;
Previous Topic: why does SELECT DISTINCT return different rows when used with ORDER BY?
Next Topic: query fine tune
Goto Forum:
  


Current Time: Sat Apr 19 15:27:45 CDT 2014

Total time taken to generate the page: 0.10581 seconds