Why does the Difference function give different results when switching order of strings to compare?
<p>In SQL Server, if I do the following:</p>

<pre><code>Difference ('Kennady', 'Kary') : I get 2
</code></pre>

<p>If i do:</p>

<pre><code>Difference ('Kary', 'Kennady') : I get 3.
</code></pre>

<p>I thought the Difference function looks at the Soundex values under the hood, and gives a 0-4 number of how many characters in place are the same.</p>

<pre><code>SELECT SOUNDEX('Kennady') AS [SoundEx Kennady]
    , SOUNDEX('Kary') AS [SoundEx Kary]
    , DIFFERENCE ('Kennady', 'Kary') AS [Difference Kennady vs Kary]
    , DIFFERENCE ('Kary', 'Kennady') AS [Difference Kary vs Kennady];
</code></pre>