운영/데이터베이스
2019. 7. 18.
Table의 File Group 옮기기
declare movetable cursor local fast_forward for Select distinct A.name From sys.sysobjects AS A INNER JOIN sys.indexes as i on A.id=i.object_id INNER JOIN sys.sysindexes AS B ON A.id = B.id INNER JOIN sys.sysfilegroups AS C ON B.groupid = C.groupid WHERE C.groupid=1 and a.id>100 and b.name is not null and A.xtype='U' and a.uid=1 and i.type=1 open movetable declare @table varchar(100) fetch from ..