Her har du:
DECLARE @sql VARCHAR(MAX)='';
SELECT @[email protected]+'SELECT TOP 3 * FROM '+'['+SCHEMA_NAME(schema_id)+'].['+name+']'+';'
FROM sys.tables
EXEC(@sql)
Her har du:
DECLARE @sql VARCHAR(MAX)='';
SELECT @[email protected]+'SELECT TOP 3 * FROM '+'['+SCHEMA_NAME(schema_id)+'].['+name+']'+';'
FROM sys.tables
EXEC(@sql)