摘要:
实现的效果,如:找出数据库表索引:表名,索引号,列名(逗号分隔)select i.object_id as tab_id , i.index_id , i.index_column_id , c.nameinto #tfrom sys.index_columns as i join sys.all_columns as c on ( i.object_id = c.object_id and i.column_id = c.column_id)where i.object_id in ( select object_id from sys.tables )order by object_nam 阅读全文