title: How to rename MS Access table with relationships using SQL?
body: <p>I'm connecting to an MS Access database from an external .Net application. I need to use SQL in order to upgrade the schema of the database. Part of the upgrade requires renaming a table that is part of a 1-to-many relationship.</p>
  
  <p>I understand that it is not possible to actually rename a table in MS Access using SQL. My research has led me to the following solution.</p>
  
  <pre><code>SELECT * INTO OldTableName FROM NewTableName
  DROP TABLE OldTableName
  </code></pre>
  
  <p>This appears to work correctly for tables that are not part of a relationship. However, if the table belongs to a relationship, then I receive the following exception when running the DROP TABLE SQL.</p>
  
  <pre><code>Cannot delete this index or table.  It is either the current index or is used in a relationship.
  </code></pre>
  
  <p>Is there a way via SQL that I can update the relationship in MS Access to point to the new table that has been created so the old table can be dropped?</p>