How can I get records count of multiple tables from linked servers.
I have two servers named production and local. I need to write query to get result as mention in this picture.
I tried
SELECT 'TableA' AS Tables, COUNT(*) AS 'QA' FROM [Database].[schema].[tablename]
UNION
SELECT 'TableB' AS Tables, COUNT(*) AS 'QA' FROM [Database].[schema].[tablename]
How to display records count of linked server?