title: MySQL remove Foreign Key without name
body: <p>I'm trying to create a script that will remove a foreign key constraint without a set name from several different MySQL DB's.  I have created the following script:</p>
  
  <pre><code>SET @CN := (SELECT CONSTRAINT_NAME
  FROM
    information_schema.KEY_COLUMN_USAGE
  WHERE
    table_name = 'inventory' and referenced_table_name='product_code' and referenced_column_name='shipping_code');
  
  ALTER TABLE inventory DROP FOREIGN KEY @CN;
  </code></pre>
  
  <p>It is correctly getting the contraint name. However it complains about the variable <code>@CN</code> in the ALTER TABLE command. Why doesn't this work?</p>