Procedure to print table contents taking table name and key as params
SamBFeb 25 2008 — edited Feb 25 2008I 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.