假设我有一个名为my_list
test
仅当data
列中的值存在时,我才想从表中获取行my_list
一个假设的代码就像
import sqlite3 as lite
conn = lite.connect ('database.db')
with conn:
conn.row_factory = lite.Row
curr = conn.cursor ()
curr.execute ('''select * from test
where data in :list''', {'list': my_list}) //I know this is not the correct syntax
那么,如何在Python中解决以下问题