I have two tables, in which I want the following logic to occur:
if (any row with a specific id exist in table1)
{
1. Delete the row from table1
2. insert some data into the table2 with the id as one of the values
3. return success somehow (for me to verify in java)
}
else
{
return fail
}
I'm sure this can be expressed in a clever manner, but I can not figure out how! Can somebody help me translate this from my procedural way of thinking?
Greetings