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
Messages: 90
Registered: July 2005
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
Messages: 24177
Registered: January 2009
Senior Member
>is there any table that provides max used so far?
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: Wed Oct 07 13:27:08 CDT 2015

Total time taken to generate the page: 0.29415 seconds