Technical Article

Find fields with similar name in all tables

,

In most places, we use some kind of field naming convention. Many times we have one or more fields with similar name in all tables for some kind of tracking. You can use this query to find similar names in all tables.


select o.name "Table", c.name "Field" from sysobjects o, syscolumns c where o.id = c.id and c.name like '%type' order by o.name
/*
This would go ahead and scan all the tables and all fields and find the fields with names that end with "type". 
*/

Rate

Share

Share

Rate