How to execute IN() SQL queries with Spring’s JDBCTemplate effectively?

I was wondering if there is a more elegant way to do IN() queries with Spring’s JDBCTemplate. Currently I do something like that: StringBuilder jobTypeInClauseBuilder = new StringBuilder(); for(int i = 0; i < jobTypes.length; i++) { Type jobType = jobTypes[i]; if(i != 0) { jobTypeInClauseBuilder.append(‘,’); } jobTypeInClauseBuilder.append(jobType.convert()); } Which is quite painful since if … Read more

Storing money in a decimal column – what precision and scale? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I’m using a decimal column to store money values on a database, and today I was wondering what precision and … Read more