
String query2 = "create TRIGGER trig after insert on "cart" + " FOR EACH ROW " + " BEGIN " + " declare expiry1 date ;" + " select expiry into expiry1 from cart; " + " if expiry1 > (1 month of purchase) then " + " delete from cart ;" + " END if ;" + " END ;"; int rs = st1.executeUpdate( query2); i have to do the above trigger operation, but i'm stuck with how to write the if condition. I would be thankful for any help.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.