Hi all,
I am trying to find out the best way to insert multiple values into single parameter marker.
for example..
Let's say I want to run this SQL Query...
"SELECT * FROM EMPLOYEE WHERE EMP_ID IN ( 'ABC', 'ADD', 'AEE', ACG' );"
And I have this
JAVA code...
PreparedStatement selectStmt = connection.prepareStatement( "SELECT * FROM EMPLOYEE WHERE EMP_ID IN (?)" );
selectStmt.clearParameters();
selectStmt.setXXXX( 1, MULTI_VALUES);
Is there a way to add multiple emp_id in above "IN" Conditional SQL Query in single parameter marker to run above query?
I know I can use setString to run "WHERE EMP_ID = ?" but I am having some trouble setting up for multiple IN values.
Or if not, what is the best way to deal with this issue.
Thank you very much.
Q