Rebuild and Reorganize indexes of a database

EXECUTE sp_msForEachTable 'SET QUOTED_IDENTIFIER ON; ALTER INDEX ALL ON ? REBUILD;'
 

EXECUTE sp_msForEachTable 'SET QUOTED_IDENTIFIER ON; ALTER INDEX ALL ON ? REORGANIZE;'

Comments

Popular posts from this blog

To Get All the Names of tables and Databases their data have changed in last 24 Hours And Backup those databases

Break comma separated into multiple rows in MYSQL

mysql global search procedure