Augusto Humire Martinez web blog

algo de web-in

Encontrar una columna en SQL Server

SELECT sysobjects.name AS table_name, syscolumns.name AS column_name,
systypes.name AS datatype, syscolumns.LENGTH AS LENGTH
FROM sysobjects INNER JOIN
syscolumns ON sysobjects.id = syscolumns.id INNER JOIN
systypes ON syscolumns.xtype = systypes.xtype
WHERE (sysobjects.xtype = ‘U’)
and (UPPER(syscolumns.name) like upper(‘%IdAgencia%’))
ORDER BY sysobjects.name, syscolumns.colid

diciembre 6, 2019 Posted by | Base de Datos | Deja un comentario