MySQL IN clause without quotes
<p>I have the follwing simple MySQL query that returns 0 results:</p>

<pre><code>SELECT d.name FROM document d WHERE 10 IN (d.categories)
</code></pre>

<p>"categories" is of type varchar and contains for example "10,20,30".</p>

<p>When I type the IN values directly it works and returns a result:</p>

<pre><code>SELECT d.name FROM document d WHERE 10 IN (10,20,30)
</code></pre>

<p>I suspect MySQL substitutes d.documents with something like this which of course is not what I want:</p>

<pre><code>SELECT d.name FROM document d WHERE 10 IN ("10,20,30")
</code></pre>

<p>What is a proper workaround for this?</p>