当我运行下面的SQL查询时,我得到了错误
打印(db.execute(“select*from(?);“),(表名))
sqlite3.operationalerror:near“?”:语法错误
db = sqlite3.Connection(":memory:")
db.execute("CREATE TABLE Students(name);")
tableName = "Students"
var1 = "Jon"
var2 = "Steve"
var3 = "Chuckie"
db.execute("INSERT INTO Students VALUES (?), (?), (?)", (var1, var2, var3))
print(db.execute("SELECT * FROM (?);"), (tableName))
将参数传入SQL查询的正确方法是什么?