MySQL Bulk value Insert batch update case

Source: Internet
Author: User
Tags bulk insert

Insert into TableName (TYPE1,TYPE2,TYPE3) VALUES ("Q1", "W1", "E1"), ("Q2", "W2", "E2"), ("Q3", "W3", "E3");

UPDATE app_history_statistics_by_hour SET h00 = case statisticaltype when "QQQ" then 11111 when the "www" then 22211 when the ' Eee ' then 333111 END WHERE weeks= ' 222 ';

Because the table structure is limited, so the entity one by one can not be used to correspond, so can only use HQL

Hibernate HQL Bulk Insert did not find the inherent method, so the use of hair, the speed increased a lot

MySQL Bulk value Insert batch update case

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.