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