insert into sqlite table with unique column

后端 未结 2 1613
無奈伤痛
無奈伤痛 2021-02-06 07:36

I\'m inserting values into my table (from python code) as follows:

cur.execute(\"insert into t(a, b, c) values (?, ?, ?)\", (a, b, c))

There is

2条回答
  •  心在旅途
    2021-02-06 08:28

    Depends :)

    If there is only one inserter the 1 might be the most efficient.

    If there are several inserters you have to use 2 as under 1 you could test and seem OK but another inserter adds the C value you have so it fails

提交回复
热议问题