In a SQL Server environment, while maintaining a SQL query that involves multiple tables, often I'll need to figure out what what table a particular column belongs to.
Unfortunately, the notation in the query is not TableName.ColumnName
, but just ColumnName
.
Is there any way to look up what table the column is being pulled from, other than manually looking at column definitions for each table? I'm thinking something I can use either in an IDE (ie Management Studio) or a T-SQL statement... but I'm open to almost anything at this point.
One additional point: I need to do this locally, without pushing information over the network, or downloading additional tools outside SQL Management Studio... or Visual Studio.