SELECT 'ALTER INDEX ALL ON ' + t.[table_Schema]+'.'+ t.[TABLE_NAME] + ' REBUILD; '
FROM INFORMATION_SCHEMA.TABLES t
WHERE t.[TABLE_TYPE] = 'BASE TABLE'
ORDER BY t.[TABLE_NAME];
after executing query copy output of query result into new window and execute it.
No comments:
Post a Comment