buscar nombre de columna en todas las tablas sql server

Solutions on MaxInterview for buscar nombre de columna en todas las tablas sql server by the best coders in the world

showing results for - "buscar nombre de columna en todas las tablas sql server"
Camilo
31 Sep 2017
1SELECT  sysobjects.name AS table_name, syscolumns.name AS column_name,
2           systypes.name AS datatype, syscolumns.LENGTH AS LENGTH
3FROM       sysobjects INNER JOIN
4               syscolumns ON sysobjects.id = syscolumns.id INNER JOIN
5               systypes ON syscolumns.xtype = systypes.xtype
6WHERE     (sysobjects.xtype = 'U') 
7                and (UPPER(syscolumns.name) like upper('%myFieldName%'))
8ORDER BY sysobjects.name, syscolumns.colid