我有一个写入SQLite3数据库的Python脚本,该表名为When checking argument func to function Prelude.Functor.map:
Type mismatch between
(l : List elem) -> Vect (length l) elem (Type of fromList)
and
a1 -> List (Vect size a) (Expected type)
Specifically:
Type mismatch between
Vect (length v0) elem
and
List (Vect size a)
,它有两个文本内容列notify_users
和language_code
。
可视化,然后,username
数据库看起来像这样:
notify_users
我想要做的是能够使用两个标准(language_code和username)来删除特定记录。
例如,我想删除| language_code | username |
---------------------------------
| de | jane_doe |
| sv | jane_doe |
| fi | jane_doe |
| de | tom_petty |
| zh | tom_petty |
列中 jane_doe
和username
中de
的记录。
language_code
如何正确格式化| language_code | username |
---------------------------------
| de | jane_doe | X
| sv | jane_doe |
| fi | jane_doe |
| de | tom_petty |
| zh | tom_petty |
查询以完成此任务?提前谢谢!
答案 0 :(得分:0)
您可以使用and
:
conn.execute("""delete from notify_user
where language_code = ? and username = ?;""",('de','jane_doe'))