TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

in-clause with parameter placehoder

Open freemine opened this issue 2 years ago • 3 comments

say: select * from t where name in (?,?,?)

does this kind of parameterized-statement could be used via taos_stmt_xxxx APIs?

freemine avatar Nov 03 '22 07:11 freemine

Yes, we support this usage.

xiao-yu-wang avatar Nov 08 '22 08:11 xiao-yu-wang

thx

freemine avatar Nov 09 '22 00:11 freemine

but seems like the following fails with errmsg "Invalid column name: col_d" in taos_stmt_bind_param_batch

select * from (select col_d from t) x where col_d in (?,?)

please confirm if the problem exists.

btw,

select * from t where col_d in (?, ?)

works just fine.

freemine avatar Nov 09 '22 00:11 freemine