我有两个表,我希望在其中发生以下逻辑:
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
}
我敢肯定这可以用巧妙的方式表达,但我不知道如何!有人可以帮我从我的程序思维方式中翻译出来吗?
问候