Wednesday, February 22, 2012

How to search a column name within all tables of a database and how to search stored procedures containing a particular text

How to search a column name within all tables of a database 

select * from information_schema.columns
where column_name like '%text%'


how to search stored procedures containing a particular text

select *
      from information_schema.routines
      where routine_definition like '%text%'
      and routine_type='procedure'

No comments:

Post a Comment