DB2Problem
Programmer
Hello ALL
I am using a preparedStatement and is passing values dynamically.
Now I want to "insert" values in the table based on condition - Insert only if a particular
value is not present else do not perform insert
below is query -
insert into CUSTOMER (EMAIL_ADDRESS,ZIPCODE) values (?,?)
where EMAIL_ADDRESS NOT IN (SELECT EMAIL_ADDRESS FROM CUSTOMER)
I know the above is not working, I put the above to show what i intend to achieve
I am using a preparedStatement and is passing values dynamically.
Now I want to "insert" values in the table based on condition - Insert only if a particular
value is not present else do not perform insert
below is query -
insert into CUSTOMER (EMAIL_ADDRESS,ZIPCODE) values (?,?)
where EMAIL_ADDRESS NOT IN (SELECT EMAIL_ADDRESS FROM CUSTOMER)
I know the above is not working, I put the above to show what i intend to achieve