title: How to remove primary key from a mysql table which is primary key and foreign key in the same table as well.?
body: <p>I have two different table having 20k entries each and mistakenly I have made summaryId as primary key and foreign key in the same table but now I want to remove the primary key constraint which is auto increament  too. When I try drop primary key syntax it returns me an error :</p>
  
  <p><strong>#1025 - Error on rename of '.\tg#sql-a38_7f' to '.\tg\rest_web_availability_summary_pm' (errno: 150)</strong> </p>
  
  <p>I tried the below query.</p>
  
  <pre><code>ALTER TABLE 'table_name' DROP PRIMARY KEY
  </code></pre>
  
  <p>If anybody has any idea please tell me how to remove primary key.</p>