You can quickly write the SQL which does use the VSIZE function. It would be difficult to write this query yourself, so let SQL write it for you! Try doing something like the following:
spool temp_script.sql select 'vsize('||column_name||')+' from dba_tab_columns where owner='SCOTT' and table_name='EMP'; spool off
The above will contain the start of your SQL statement -- the part with all of those VSIZE commands. It should look similar to the following:
vsize(EMPNO)+ vsize(ENAME)+ vsize(DEPTNO)+ vsize(SAL)+
Simply edit this as follows:
select vsize(EMPNO)+ vsize(ENAME)+ vsize(DEPTNO)+ vsize(SAL) from scott.emp;
Then run the script with "@temp_script" in SQL*Plus.
Dig Deeper on Oracle and SQL
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.