title: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
body: <p>I am using Sybase Power Designer to create a database from a physical data model (Sybase creates an SQL file) . When i import the SQL file with phpMyAdmin I have the following error:</p>
  
  <blockquote>
    <p>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if exists(select 1 from sys.sysforeignkey where role='FK_ARTWORK_CREATES_ARTIST'' at line 7 . </p>
  </blockquote>
  
  <p>Any ideas? Could this error appear due to errors on the physical model or there is another problem?</p>
  
  <p>This is the code :</p>
  
  <pre><code>if exists(select 1 from sys.sysforeignkey where role='FK_ARTWORK_HAS_BUY') then
      alter table artwork
         delete foreign key FK_ARTWORK_HAS_BUY
  end if;
  </code></pre>