Is it possible to query all tables with the same column for their values?
For example, I have the Bank named SGE
, I have 230 tables in it, all these tables have the CodPRF
column and I want Query to return all the results in that the tables have the column with the value of CodPRF
being equal to 101.
I thought of something like this (just an example to see if it helps you better understand your problem):
SELECT TOP (1000) [ALL_Collums]
FROM [SGE_TESTE].[dbo].[ALL_Tables]
WHERE CODPRF = '101'