title: How to convert a String to Hex and vice-versa?
body: <p>As you know , in MySQL we have HEX &amp; UNHEX, for example when I write like this :</p>
  
  <pre><code>select hex("Ali");
  </code></pre>
  
  <p>the convert result is : 416C69</p>
  
  <p>and the unhex is like this : <code>select unhex("416C69");</code></p>
  
  <p>In MSSQL I can't convert this, could you please give me an example for both of them ???</p>
  
  <p>Thanks a lot ...</p>