Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> column name as a part of the result set
Is it possible to get the column name as a part of the result in a
query without using PL/SQL? I can use a procedure if necessary.
Below is a simple example but the real tables have many more columns.
Base_Table:
ID_COL VAL_COL 1 One 2 Two Audit_Table: ID_COL VAL_COL 1 One 2 Too Select at.ID_COL, at.VAL_COL, column_name (this is what I need) From Audit_Table at, Base_Table bt Where bt.ID_COL = at.ID_COL and bt.VAL_COL != at.VAL_COL; The result set would be something like: ID_COL VAL_COL column_name 2 Too VAL_COL
Any ideas?
Thanks, Tod Received on Thu Feb 12 2004 - 14:12:30 CST