title: mysql how to concat/append binary data type
body: <p>I am trying to write a stored function which will return BINARY(20) type. I would like to format this return value, by putting string, itn, float values in it. But I couldn't figure it out how can I append binary data.</p>
  
  <pre><code>CREATE FUNCTION `test`() RETURNS binary(20)
  BEGIN
  declare v binary(20);
  
  set v:= CAST('test' as binary);
  set v := v || cast(5 as binary); -- I would like to append 5 as binary but how?
  
  return v;
  END
  </code></pre>
  
  <p>First line writes test as binary, at second line I would like to append 5 as binary. How can I do that? Thank you all..</p>