I am trying to use ?
to allow me to set arbitrary column names.
import sqlite3
conn = sqlite3.connect(':memory:')
c = conn.cursor()
c.execute("create table mytab (? text, ? real)", ('v1', 'v2'))
But I got the following error. So it is not possible to use ?
when creating tables?
Traceback (most recent call last):
File "/tmp/main1.py", line 10, in <module>
c.execute("create table mytab (? text, ? real)", ('v1', 'v2'))
sqlite3.OperationalError: near "?": syntax error