0

Hi there I am new to oracle I am looking for a good way to convert my MySQL query into Oracle SQL

here is the SQL from my MySQL:

update billing, kb_detail 
    set tanggal_penagihan = :tanggal_penagihan 
        is_change = :is_change 
where billing.no_billing_sap = :no_billing_sap 
  and billing.no_billing_sap = kb_detail.no_billing_sap 

while I was reading the answers most ppl give, I found out that I need to use merge into syntax or make a loop and assign the column name one by one, is there any better way? I mean like a simple way that MySQL update syntax

0

1 Answer 1

1

The only way to update two tables in Oracle is to run two UPDATE statements:

update billing
    set tanggal_penagihan = :tanggal_penagihan 
where no_billing_sap = :no_billing_sap;

update kb_detail 
       is_change = :is_change 
where no_billing_sap =  :no_billing_sap;

If you wrap that in a transaction there won't be a difference to what you did in MySQL

Sign up to request clarification or add additional context in comments.

1 Comment

thanks for the help man , you are the best horse with no name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.