What is the record limit (n) of MySQL extended insert statement?
INSERT INTO table (field) VALUES (1),(2),(n)
What happens when the limit exceeds? Will only overflow rows left out or the whole statement failed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t believe there’s any hard limit on the number of rows inserted. There is a limit on the maximum size of a MySQL query in general, though; statements longer than the setting of
max_allowed_packetwill be rejected by the server. (They won’t run at all.)MySQL 5.5.6 changed the default value of
max_allowed_packetfrom 1 MB to 4 MB. That’s still quite a bit. 🙂