Validating sql syntax

You also get rid of the probably necessary table-lock during this action. ON DUPLICATE KEY UPDATE statement, the returned value is as follows:1 for each successful INSERT.2 for each successful UPDATE.

If you need plan to get the LAST_INSERT_ID() from a INSERT ... I haven't seen this mentioned elsewhere on this page, but you can use a SELECT statement as a single value if it returns a single value.Therefore, it is NOT recommended to use Insert-Select statements with Cluster databases if the auto-incrementing ID is meant to imply an absolute order on the timing of insertion into a table.The developer will need to explicitly pull out each row from t2 and insert them individually into t1 for the desired effect.Combine queries for Insert and Select always obeys Innodb locking rulesif one of the source table is based on Innodb engine.It is also possible that the INSERT activity applicable to TEMPORARYtable which is not Inno DB engine.

Leave a Reply