title: Is there a way in MySQL to automatically convert empty string to NULL value?
body: <p>I have a table I'm trying to add a unique index to. Problem is, the way the script is set up that inserts data, there will be on occasion, some empty strings instead of <code>NULL</code>.</p>
  
  <p>So, aside from changing the script (which I foresee being necessary unless someone saves me!).... is there any setting in mysql that can <em>automatically</em> use <code>NULL</code> value if an empty string is passed through to the unique key?</p>