-
Maximum filed length within schema
Hi.. Could you please advise what dictionary tableview (if applicable) could I query that gives me the field with the maximum length for all tables within a schema? Thanks
-
Oracle® Database Reference 10g Release 1 (10.1)
http://download-west.oracle.com/docs...htm#sthref2876
USER_TAB_COLUMNS.DATA_LENGTH
HTH
-
Thanks.
I ran the following:
select max(data_length), from USER_TAB_COLUMNS;
MAX(DATA_LENGTH)
----------------
4000
How do I get the table_name included in the result?
I tried running the following:
select max(data_length),table_name from USER_TAB_COLUMNS;
*
ERROR at line 1:
ORA-00937: not a single-group group function
Please help and thanks.
-
what are you actually trying to find out?.
The maximum length of each column in each table?
-
The longest column with the table name and owner.
-
Try this:
Code:
select *
from (
select table_name, max(data_length) from user_tab_columns
where user = 'TAMIL'
group by table_name
order by 2 desc
)
where rownum <= 1
/
Tamil
-
It worked. Thank you for your help.
-
im curious, why do you care who has the longest column.
Sounds like a game public schoolboys might play :|
-
Originally Posted by davey23uk
im curious, why do you care who has the longest column.
Sounds like a game public schoolboys might play :|
Looks like class assignment.
Tamil
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|