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: 25546
Registered: January 2009
Location: SoCal
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: Fri Jul 28 10:02:48 CDT 2017

Total time taken to generate the page: 0.11850 seconds