title: Substring Binary Data in MYSQL
body: <p>I have a binary column in my table in mysql. I need to update all the rows for example.</p>
  
  <p>Replace 2nd byte with 1. Doesn't matter what the value was.</p>
  
  <pre><code>SELECT HEX(data) FROM table;
  </code></pre>
  
  <p>Then</p>
  
  <pre><code>UPDATE table SET data[1] = 1; // the idea
  </code></pre>
  
  <p>But how do you do something like this in mysql?</p>