title: sqlite3.OperationalError: near "--": syntax error
body: <p>Can't find where is this typo or something - everytime getting this error <code>line 33, in &lt;module&gt;
      c_a.execute('ATTACH DATABASE temp.db AS check')
  sqlite3.OperationalError: near "check": syntax error</code></p>
  
  <p>I'm trying to attach database <code>temp.db</code> to the <code>prime.db</code> due one query. This has help me to find duplicate records (checking <code>login</code> (one of the columns in both databases))</p>
  
  <pre><code>import sqlite3
  
  db_a = sqlite3.connect('prime.db')
  c_a = db_a.cursor()
  
  db_b = sqlite3.connect('temp.db')
  c_b = db_b.cursor()
  
  c_a.execute('ATTACH DATABASE temp.db AS check')
  c_a.execute('SELECT * FROM check.user_info WHERE user_info.login = user.login')
  db_a.commit()
  c_a.fetchall()
  </code></pre>
  
  <p>Also tried another version:</p>
  
  <pre><code>attachDatabaseSQL = "ATTACH DATABASE temp.db AS check"
  dbSpec = ("temp.db",)
  c_a.execute(attachDatabaseSQL, dbSpec)
  c_a.execute('SELECT * FROM check.user_info WHERE user_info.login = user.login')
  db_a.commit()
  c_a.fetchall()
  </code></pre>
  
  <p>It found the error:
      <code>line 41, in &lt;module&gt;
      c_a.execute(attachDatabaseSQL, dbSpec)
      sqlite3.OperationalError: near "check": syntax error</code></p>
  
  <p>Use Python 3.8.1 and SQLite3.</p>
  
  <p>UPDATE:
  Changed it to:</p>
  
  <pre><code>c_a.execute('ATTACH DATABASE temp.db AS dbcheck')
  c_a.execute('SELECT * FROM check.user_info WHERE user_info.login = user.login')
  db_a.commit()
  c_a.fetchall()
  </code></pre>
  
  <p>And the ERROR NOW IS:</p>
  
  <pre><code>c_a.execute('ATTACH DATABASE temp.db AS dbcheck')
  sqlite3.OperationalError: no such column: temp.db
  </code></pre>