Java – can I ask the JDBC template to extend a list parameter for use in an in () clause?

Can I do this

select * from mytable m where m.group_id in (?)

... and pass in a list or array parameter to extend to my parameter, that is:

select * from mytable m where m.group_id in (1,2,3,4)

Specifically, I use the spring and jdbctemplate / simplejdbctemplate classes

Solution

Sorry, I can't do that You can write a convenient method yourself, but as far as I know, there is no setparameterlist () like hibernate

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>