USE AtlantisDB GO DECLARE @TableName VARCHAR(MAX)= NULL -- Tablo adı parametresini SET ediyorsun SELECT @TableName=COALESCE(@TableName+',','')+'['+t.TABLE_CATALOG+'].['+ t.TABLE_SCHEMA+'].['+o.Name+']' FROM sysindexes AS i INNER JOIN sysobjects AS o ON i.id = o.id INNER JOIN INFORMATION_SCHEMA.TABLES T ON T.TABLE_NAME = o.name WHERE i.indid < 2 AND OBJECTPROPERTY(o.id,'IsMSShipped') = 0 AND i.rowcnt >1000000 AND i.rowcnt <= 100000000 AND o.name NOT LIKE '%Temp_MesajHareketDB%' AND o.name NOT LIKE '%Temporary%' AND o.xtype != 'TF' ORDER BY o.name ASC --PRINT (@TableName)