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)
I ran the following:
select max(data_length), from USER_TAB_COLUMNS;
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.
select table_name, max(data_length) from user_tab_columns
where user = 'TAMIL'
group by table_name
order by 2 desc
where rownum <= 1
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 :|
Looks like class assignment.
Originally Posted by davey23uk
Click Here to Expand Forum to Full Width