SQL query SELECT FROM [value from column of another table]
问题 I have a table X where a trigger will insert a row when there's a changes to some tables. I've inserted the table name into table X. Now, I would like to select the data from table X while inner join with the actual table itself. Is it possible by using a value from a column of the select table as the table for inner join? The query should looks something like this SELECT X.a, Y.b, Y.c FROM X INNER JOIN [X.TableName] AS Y ON Y.ID = X.ID 回答1: Executing select 'SELECT X.a, Y.b, Y.c FROM X INNER