Search All Database Table Columns
    
    
    Published: Aug 16, 2019
    
      
      
      
        
Updated: May 3, 2021
    
    Updated: May 3, 2021
Ever wanted to search an entire database for a column by name? Well, put your detective hat on, ‘cause it’s possible.
Oracle #
SELECT * 
FROM all_tab_cols
WHERE column_name LIKE '%<FOO>%';
Postgres #
SELECT * 
FROM information_schema.columns
WHERE column_name LIKE '%<foo>%';