mysql - Update table with data from secondary table by foreignkey -


मेरे पास दो टेबल हैं: tableA और tableB । मैं tableB को निकालना चाहता हूं, इसलिए यह बेमानी है, इसलिए मुझे कॉलम मूल्यों को tableB से tableA कॉपी करना होगा।

टेबल ए: <पूर्व> | आईडी | नाम | टेबलए_आईडी |

तालिका B

  | आईडी | टेबल सी_आईडी | टेबल डी_आईडी |   

tableA बदल दिया गया है, इसलिए इसमें अतिरिक्त कॉलम हैं tableA :

  | आईडी | नाम | टेबलए_आईडी | टेबल सी_आईडी | टेबल डी_आईडी |   

तो मूल रूप से मैं कॉलम tableB.tableC_id और tableB.tableD_id में tableA.tableC_id और tableA.tableD_id

कैसे मैं एक एसक्यूएल अद्यतन में इसे बंद खींच सकते हैं?

आप अपडेट के साथ अपडेट करते हैं ; -)

  सारणी सारणी में एक टेबल पर शामिल होने के लिए TableB.id = tableB.id सेट तालिका A.tableC_id = tableB.tableC_id, tableA.tableD_id = tableB.tableD_id;    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -