Skip to Main Content
  • Questions
  • PL/SQL code fot PRINT_TABLE function

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, TARIQ.

Asked: March 04, 2008 - 8:57 am UTC

Last updated: June 20, 2011 - 9:56 am UTC

Version: 10.2.0.1.0

Viewed 10K+ times! This question is

You Asked

i am unable to find the PL/SQL implementation of PRINT_TABLE function/procedure.

looking for exact link to download the code

and Tom said...

Rating

  (5 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

TARIQ ANJUM, March 06, 2008 - 11:19 pm UTC


Link not to be found

A reader, September 21, 2009 - 8:59 am UTC

Hi the link is not found. Still

tejas patel, June 19, 2011 - 1:38 am UTC

Hi tom,
link is not available .Please provide active link.

Regards,
Tejas Patel
Tom Kyte
June 20, 2011 - 9:56 am UTC


http://asktom.oracle.com/pls/asktom/asktom.search?p_string=print_table+code


it might not be the first link anymore after 3 years, but you should be able to find it

print_table

Duke Ganote, June 20, 2011 - 1:14 pm UTC

Shouldn't it be findable here?
http://tkyte.blogspot.com/2009/10/httpasktomoraclecomtkyte.html

The name didn't ring any bells, so I poked around and found it here:
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1035431863958

Getting Error Running Print_Table Procedure

Jim Cox, March 20, 2014 - 10:17 pm UTC

Hi Tom


first thanks for the print_table procedure
I have been using it for some time now
I am prety sure I have the most recent load from http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1035431863958

I am encountering an error trying to dump all columns from v$sql_bind_capture

Any assistance is appreciated

Thanks
Jim


set serveroutput on size 1000000

These run fine

exec print_table ('select parsing_schema_name,sql_id,first_load_time from v$sqlarea  where sql_id = ''2zrnvnm3svjjc'' ');

exec print_table ('select sql_id,name,datatype_string,value_string from v$sql_bind_capture where sql_id = ''2zrnvnm3svjjc'' ');

This runs fine
exec print_table ('select * from v$sqlarea  where sql_id = ''2zrnvnm3svjjc'' ');



This one gives an error
exec print_table ('select * from v$sql_bind_capture where sql_id = ''2zrnvnm3svjjc'' ');

SQL> exec print_table ('select * from v$sql_bind_capture where sql_id = ''2zrnvnm3svjjc'' ');
BEGIN print_table ('select * from v$sql_bind_capture where sql_id = ''2zrnvnm3svjjc'' '); END;

*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected CHAR got -
ORA-06512: at "LLPROD.PRINT_TABLE", line 119
ORA-06512: at line 1

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library