SQL Server search for a column by name

后端 未结 5 758
小蘑菇
小蘑菇 2020-12-31 02:12

I\'m doing some recon work and having to dig through a few hundred SQL Server database tables to find columns.

Is there a way to easily search for columns in the da

5条回答
  •  清酒与你
    2020-12-31 02:35

    select c.name as ColumnName, o.name as TableName
    from sys.columns c
    inner join sys.objects o on c.object_id = o.object_id
    where c.name = 'MyColumnName'
    

提交回复
热议问题