title: How to get the names of foreign key constraints in SQLite?
body: <p>Does SQLite indeed have a limitation that it is not possible to retrieve the name of a foreign key? I am asking because I couldn't find this limitation mentioned anywhere in their documentation.</p>
  
  <p>For example, I run the following script:</p>
  
  <pre><code>CREATE TABLE
         users (
         id INTEGER NOT NULL PRIMARY KEY,
         first_name TEXT NOT NULL,
         last_name TEXT NOT NULL
  ) ;
  
  CREATE TABLE
         orders (
         id INTEGER NOT NULL PRIMARY KEY,       
         user_id INTEGER NOT NULL,       
         CONSTRAINT fk_users FOREIGN KEY (user_id) REFERENCES users(id)
  ) ;
  </code></pre>
  
  <p>Now I would like to check that the key "fk_users" was created indeed, so I run the following PRAGMA:</p>
  
  <pre><code>PRAGMA foreign_key_list(orders);
  </code></pre>
  
  <p>I would expect to see the name of my foreign key in the first column, but I am seeing some "0" value instead. Moreover, if I create multiple foreign keys with custom names, they are all called either "0" or "1". </p>
  
  <p>Is this indeed a limitation of SQLite, or am I missing something?</p>