DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Search For Column Names In An Oracle DB

  • submit to reddit
select table_name, column_name from all_tab_columns where column_name like '%X%'

...where "X" is the column name I'm looking for    


Snippets Manager replied on Thu, 2011/06/30 - 11:18am

Hey TGE, if you want to look for a specific value as opposed to a wildcard search just dorp the % from the end of the statement. I like the idea of a God Emperor struggling with the implementation of database metadata as much as this mortal does

Snippets Manager replied on Wed, 2010/06/16 - 12:57pm

So what if you want to look for tables with a column of that name where the name equals a specific value? How would you do that. Sorry for the bump.

William Notowidagdo replied on Wed, 2007/08/15 - 11:34pm

just what i need. thank you :D