Search specific value in all field in oracle table
<p>I want to search some keyword in table but I don't know to which column it is belonging to. I have got one of query for that as follows:</p>

<p>variable val varchar2(10)
 exec :val := 'KING'</p>

<p>PL/SQL procedure successfully completed.</p>

<p>SELECT DISTINCT SUBSTR (:val, 1, 11) "Searchword",</p>

<pre><code> SUBSTR (table_name, 1, 14) "Table",
 SUBSTR (column_name, 1, 14) "Column"   FROM cols,
 TABLE (xmlsequence (dbms_xmlgen.getxmltype ('select '
 || column_name
 || ' from '
 || table_name
 || ' where upper('
 || column_name
 || ') like upper(''%'
 || :val
 || '%'')' ).extract ('ROWSET/ROW/*') ) ) t
</code></pre>

<p>ORDER BY "Table"</p>

<p>Searchword  Table          Column</p>

<hr>

<p>KING        EMP            ENAME</p>

<p>but I am not getting appropriate output.I only got output as:
PL/SQL procedure successfully completed. I have tried but I didn't get satisfactory answer. Can anybody please help..?</p>