title: How can I find a particular column name within all tables in Hive.?
body: <p>How can I find a particular column name within all tables in Hive?</p>
  
  <p>I ran this query in hive: <code>select table_name,column_name from retail.columns where column_name like '%emp%';</code> (<em>retail</em> is a database).</p>
  
  <p>But it's giving:</p>
  
  <blockquote>
    <p>error FAILED: SemanticException Line 0:-1 Table not found 'columns'</p>
  </blockquote>
  
  <p>I tried query: <code>select distinct table_name from default.columns where column_name = 'emp'</code> (<em>default</em> is mine database). But it's also giving error.</p>
  
  <p>I searched about these, I got which query I wrote it's for SQL databases.</p>
  
  <p>But I want to search in hive database? How to get in hive?</p>
  
  <p>The same question has been asked before but I feel things might have changed and there might be direct solution: </p>
  
  <p><a href="https://stackoverflow.com/questions/28273589/how-can-you-search-for-all-tables-with-a-given-column-name-and-return-which-tabl">How can you search for all tables with a given column name and return which tables have this column name in Hadoop/Hive?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/29569359/searching-tables-and-columns-in-hive">Searching Tables and Columns in Hive</a></p>