有时需要根据索引名称,找到该索引所属的表。
select a.name as tabname
,h.name as idname
from sys.objects as a
right join sys.indexes as h on a.object_id=h.object_id
where a.type<>'s' AND (h.name LIKE '%Width%' OR h.name LIKE '%Height%' )
有时需要根据索引名称,找到该索引所属的表。
select a.name as tabname
,h.name as idname
from sys.objects as a
right join sys.indexes as h on a.object_id=h.object_id
where a.type<>'s' AND (h.name LIKE '%Width%' OR h.name LIKE '%Height%' )