title: MySQL/MariaDB Drop Table if Created
body: <p>So I want to create a trigger or some other kind of method for dropping an entire table if it is created. I have the following SQL query but as of this moment I'm stuck.</p>
  
  <pre><code>CREATE OR REPLACE
      TRIGGER `kill_migrations` AFTER CREATE ON SCHEMA
  BEGIN
      IF SYS.DICTIONARY_OBJ_TYPE = 'TABLE' THEN
          DROP TABLE IF EXISTS django_migrations
  END;
  </code></pre>
  
  <p>How do I drop a table if it is created? The current SQL query provided has a syntax error around "Drop Table".</p>