title: How to use editdist3 in sqlite
body: <p>According to an <a href="https://stackoverflow.com/a/13928405/1534459">answer to another question</a>, in sqlite the Levenshtein distance is implemented in a SQL function called <code>editdist3</code>. (Compare also the <a href="http://www.sqlite.org/spellfix1.html" rel="nofollow noreferrer">documentation</a>)</p>
  
  <p>Now when I try to use it, all I get is an error that it doesn’t exist:</p>
  
  <pre><code>╰┄┄&gt; sqlite3
  SQLite version 3.11.1 2016-03-03 16:17:53
  Enter ".help" for usage hints.
  Connected to a transient in-memory database.
  Use ".open FILENAME" to reopen on a persistent database.
  sqlite&gt; CREATE TABLE test (col1 TEXT);
  sqlite&gt; INSERT INTO test VALUES ('foobar');
  sqlite&gt; SELECT * FROM test WHERE editdist3(col1, 'f00bar') &lt; 3;
  Error: no such function: editdist3
  </code></pre>
  
  <p>I’m using sqlite-3.11.1 on Gentoo Linux with (default) USE flags <code>icu</code>, <code>readline</code> and <code>secure-delete</code>.</p>