You get all tables containing the column product using this statment:
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('Product')
AND TABLE_SCHEMA='YourDatabase';
Then you have to run a cursor on these tables so you select eachtime:
Select * from OneTable where product like '%XYZ%'
The results should be entered into a 3rd table or view, take a look here.
Notice: This can work only if the structure of all table is similar, otherwise aou will have to see which columns are united for all these tables and create your result table / View to contain only these columns.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…