Search for a column in your database.
Some times you need to find a table,view or store procedure and you remember a column name but cant really figure out what table it was on, or maybe you need to find all tables that have a coulumn that you are trying to modify or delete and you know need to confirm all the places where its used, here are some querys to do it.
Tables and Views:
select table_name,column_name from information_schema.columns
where column_name like '%(your column name)%'
Search for values inside the Stored procedures :
select routine_name, routine_definition
from information_schema.routines
where routine_definition like '%tax_id%'
and routine_type='(your column name)'
Written by Luis Tellez
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sql
Authors
Related Tags
#sql
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#