【发布时间】:2022-08-06 19:36:17
【问题描述】:
使用RSQLite和DBI包组成查询时,不知道有没有办法使用SQL关键字IN?
我不认为 SQL 关键字 IN 当前已实现?
例如
## instead of:
dbGetQuery(con, \"SELECT * FROM mtcars WHERE cyl = :targetCyl\" ,
params = list( targetCyl = 4 ))
## I want to do the following:
dbGetQuery(con, \"SELECT * FROM mtcars WHERE cyl IN :targetCyl\" ,
params = list( targetCyl = c( 2, 4, 6 ) ))