SQLite: bind list of values to “WHERE col IN ( :PRM )”

后端 未结 9 654
轮回少年
轮回少年 2020-12-16 09:53

all I want to do is send a query like

SELECT * FROM table WHERE col IN (110, 130, 90);

So I prepared the following statement



        
9条回答
  •  时光取名叫无心
    2020-12-16 10:40

    I just faced this question myself, but answered it by creating a temporary table and inserting all the values into that, so that I could then do:

    SELECT * FROM TABLE WHERE col IN (SELECT col FROM temporarytable);
    

提交回复
热议问题