hi friends,i have a question..i have a query and i want to execute query column but i don`t know how can i do it?please help me..declare @table_schema nvarchar(50) = 'dbo', @table_name nvarchar(50) = 'TableA', @id int = 1(select fk_col.TABLE_SCHEMA, fk_col.TABLE_NAME, fk_col.COLUMN_NAME, 'select * from ' + fk_col.TABLE_SCHEMA + '.' + fk_col.TABLE_NAME + ' t1 ' + ' inner join ' + @table_schema + '.' + @table_name + ' t2 ' + ' on t1.' + fk_col.COLUMN_NAME + ' = t2.' + pk_col.COLUMN_NAME + ' where t2.' + pk_col.COLUMN_NAME + ' = ' + cast(@id as nvarchar)) queryfrom INFORMATION_SCHEMA.TABLE_CONSTRAINTS pk join INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE pk_col on pk.CONSTRAINT_SCHEMA = pk_col.CONSTRAINT_SCHEMA and pk.CONSTRAINT_NAME = pk_col.CONSTRAINT_NAME join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS fk on pk.CONSTRAINT_SCHEMA = fk.UNIQUE_CONSTRAINT_SCHEMA and pk.CONSTRAINT_NAME = fk.UNIQUE_CONSTRAINT_NAME join INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE fk_col on fk_col.CONSTRAINT_SCHEMA = fk.CONSTRAINT_SCHEMA and fk_col.CONSTRAINT_NAME = fk.CONSTRAINT_NAMEwhere pk.TABLE_SCHEMA = @table_schema and pk.TABLE_NAME = @table_name and pk.CONSTRAINT_TYPE = 'PRIMARY KEY'