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