Is there a way to search a whole table or tables for a certain value? I created a stored procedure to search all tables for a column and figured I could change it to search for a value. I have provided my stored procedure below:
CLEAR SCREEN
SET VERIFY OFF
ACCEPT column_name CHAR PROMPT 'Please insert column name: '
CLEAR SCREEN;
SELECT DISTINCT table_name
FROM all_tab_columns
WHERE column_name = TRIM(UPPER('&column_name'));
SET TERM ON
ACCEPT response CHAR PROMPT 'Would you like to search for another column? '
COLUMN script new_value script
SET TERM OFF
SELECT CASE LOWER('&response.') WHEN 'yes' THEN 'columnfinder' ELSE 'stop' END AS script
FROM DUAL;
SET TERM ON
@&script.
I apologize I tried to post the code using the tools above but it didn't work.