This topic is locked

How insert register select to delete in another table

9/12/2017 11:15:15 PM
PHPRunner General questions
C
cjarerov author

I will like to use the selecto register to insert in another table, only updating the key field
some body know how can I
Enter to my master table, I selected several register from secondary table and i want insert in the third table
Thanks

admin 9/13/2017

Unfortunately your question is difficult to decipher. Hopefully this helps.
In MySQL there is an option to insert multiple records in one go.

INSERT INTO tbl_temp2 (fld_id)

SELECT tbl_temp1.fld_order_id

FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;


More info:

https://dev.mysql.com/doc/refman/5.7/en/insert-select.html

romaldus 9/13/2017



Unfortunately your question is difficult to decipher. Hopefully this helps.
In MySQL there is an option to insert multiple records in one go.

INSERT INTO tbl_temp2 (fld_id)

SELECT tbl_temp1.fld_order_id

FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;


More info:

https://dev.mysql.co...ert-select.html


dechiper <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=83186&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />