Home Forums SQL Server 2008 SQL Server Newbies How to get alter index statement from select statement RE: How to get alter index statement from select statement
Akayisi
Right there with Babe
Points: 735
More actions
January 7, 2014 at 7:25 am
#1678071
Thanks a lot by the way i guess this is also working
select 'ALTER INDEX '+sys.indexes.name+ ' ON '+sys.tables.name+' rebuild' from sys.indexes,sys.tables
where sys.indexes.object_id=sys.tables.object_id
and
sys.indexes.name is not null