Is there any way for a column in which table is it using SQL Query?
yes, Assuming this is a db SQL server, you can check the query below -
select [name], object_name(id) from sys.columns where [name] like '%columnname%'
object_name (id) will give you the table name for the specified column name.
You can try something like this using Sql Server 2005+
SELECT OBJECT_NAME(c.OBJECT_ID) TableName, c.name ColumnName FROM sys.columns c WHERE c.name = '<column name>'
Try
SELECT OBJECT_NAME(id) FROM syscolumns WHERE [name] = 'mycolumn'
syscolumns ( , ), , . .
If you are trying to figure out from which table a particular column arose in a query, the best option is to alias all the columns at the time of writing the queries. I would not accept any code in a code review that does not do this, because it is a pain to understand later.
Source: https://habr.com/ru/post/1769319/More articles:problem while removing display: none with jQuery - javascriptApparently the redundant ActiveRecord has_many definition is ruby-on-railsIGeoPositionWatcher.PositionChanged не запускается, но GeoCoordinateWatcher.PositionChanged - c#Is reading / writing to a pipe an expensive operation? - cWhat is the OJDBC driver for Java 6? - javaIvy: извлечение моментального снимка, опубликованного в Nexus, и его зависимостей - nexusМогу ли я сделать это с помощью LINQ? - c#How to play video using MPMoviePlayerController in iphone? - iphoneDefine DataGrid rows declaratively in XAML - c #How to add data to a DataGridView - c #All Articles