Microsoft SQL Server Rebuild all index database


Example

EXEC sp_MSForEachTable 'ALTER INDEX ALL ON ? REBUILD'