Differences between mysql and Oracle update

Source: Internet
Author: User

Update: it is unnecessary to update a single table. The two are the same, mainly about updating multiple tables.
Copy codeThe Code is as follows:
Oracle> Oracle has strict requirements for multi-Table update, so sometimes it is not very easy to write. We can try Oracle's cursor
Update (
Select t. charger_id _ new_charger_id _
From t_cus_year_status t
Left join t_customer_infos cuus on cus. id _ = t. cus_id _
Where ....
) N set n. new_charger_id _ = 6;


Copy codeThe Code is as follows:
Mysql>
Update t_cus_year_status t
Left join t_customer_infos cuus on cus. id _ = t. cus_id _
Set t. charger_id _ = 6
Where ......;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.