title: Cannot DROP the index because it is not a statistics collection
body: <p>I'm trying to execute this command on Sql Server Management Studio:</p>
  
  <pre><code>DROP STATISTICS dbo.TableName.StatsName
  </code></pre>
  
  <p>But I'm receiving this error: </p>
  
  <blockquote>
    <p>Cannot DROP the index because it is not a statistics collection.</p>
  </blockquote>
  
  <p>Also, if I try to go on the table "Statistics" folder on the navigation menu, and try to drop with contextual menu, the voice <em>drop</em> is disabled.</p>
  
  <p>When I try to look for it in the <code>sys.stats</code> table, I have the following result:</p>
  
  <pre><code>Auto_Created: 0
  User_Created: 0
  </code></pre>
  
  <h2>Is there a way to drop this kind of statistic?</h2>
  
  <p>EDIT</p>
  
  <p>Thanks to CR241 answer and Dan Guzman comment I was able to find out some solution to this problem. I wanted to ALTER an nvarchar column length, but couldn't do that because there were some constraints on it.
  I had the same problem on a lot of database tables. It was because there were many indexes and statistics created with Database Tuning Advisor. 
  So I created a script to delete them all (ideal would be to delete and restore, after altering all columns).
  Maybe this will be useful to someone else:</p>
  
  <pre><code> GO
  DECLARE selectIndexes CURSOR FOR
  SELECT  
       QUOTENAME(SCHEMA_NAME(t.[schema_id]))
      + '.' + QUOTENAME(t.name) 
      + '.' + QUOTENAME(i.name) as FullIndexName
      FROM sys.indexes  i
      INNER JOIN sys.tables  t ON i.[object_id] = t.[object_id]
      INNER JOIN sys.stats  s ON s.object_id = i.object_id and s.name = i.name
      LEFT JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc ON i.Name = tc.CONSTRAINT_NAME 
              AND OBJECT_NAME(i.Object_ID) = tc.TABLE_NAME
      where QUOTENAME(i.name) like '__dta_%' and i.type_desc = 'NONCLUSTERED';
  
  
  
      DECLARE @fullIndexName nvarchar(max);
  
      DECLARE @sql NVARCHAR(max) = '';
  
      OPEN selectIndexes
  FETCH NEXT FROM selectIndexes INTO @fullIndexName
  WHILE (@@FETCH_STATUS = 0)
  BEGIN
      set @sql = @sql+ 'DROP INDEX ' + @fullIndexName + CHAR(13) + CHAR(10);
  
      FETCH NEXT FROM selectIndexes INTO @fullIndexName
  END
  
  CLOSE selectIndexes
  DEALLOCATE selectIndexes
  
  print @sql;
  --exec sp_executesql @sql;
  </code></pre>