Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Procedure to print table contents taking table name and key as params

SamBFeb 25 2008 — edited Feb 25 2008
I am trying to create a procedure that would print (to the buffer) column - value pairs for a given table using a given key.

i.e.
show_tab('EMP',6532);

--------------------------------
EMPNO = 6532
EMPNAME = JOHN
...

For simplicity assume all tables have the same primary key column name and there are no composite keys.

Alternatively a procedure that did what SQL*PLUSs print command does (except in this case I want write to the database buffer) would be just as useful.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2008
Added on Feb 25 2008
2 comments
423 views