How to use substr(...) for BIT(...) data type columns?
<p>I have this table:</p>

<pre><code>// numbers
+---------+------------+
|    id   |    numb    |
+---------+------------+
| int(11) |   bit(10)  |
+---------+------------+
| 1       | 1001100111 |
| 2       | 0111000101 |
| 3       | 0001101010 |
| 4       | 1111111011 |
+---------+------------+
</code></pre>

<p>Now I'm trying to get third digit <em>(left to right)</em> from those number. Example:</p>

<pre><code>1001100111
  ^ // I want to get 0
</code></pre>

<p>So it is expected result:</p>

<pre><code>+--------------------+
| substr(numb, 3, 1) |
+--------------------+
| 0                  |
| 1                  |
| 0                  |
| 1                  |
+--------------------+
</code></pre>

<hr>

<p>Here is my query:</p>

<pre><code>SELECT SUBSTR(numb, 3, 1) FROM numbers
</code></pre>

<p>But it doesn't work. because <code>bit(10)</code> isn't string and <code>SUBSTR()</code> cannot parse it. Is there any workaround?</p>