106
GB
What is the SQL UPDATE JOIN syntax used for?
IN
SQL UPDATE JOIN सिंटैक्स का उपयोग किसके लिए किया जाता है?
A
Performing a JOIN query that includes update logic
एक JOIN क्वेरी निष्पादित करना जिसमें अद्यतन तर्क शामिल है
B
Joining two UPDATE statements
दो अद्यतन कथनों को जोड़ना
C
Updating foreign key relationships
विदेशी कुंजी संबंधों को अद्यतन करना
D
Updating rows in one table based on conditions or values from another table by joining them within the UPDATE statement
किसी अन्य तालिका की शर्तों या मानों के आधार पर एक तालिका में पंक्तियों को अद्यतन कथन के भीतर जोड़कर अद्यतन करना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
UPDATE with JOIN: UPDATE orders o JOIN customers c ON o.cust_id=c.id SET o.discount=0.1 WHERE c.tier=gold. Updates order discounts based on customer tier from another table. MySQL syntax differs from standard SQL which uses UPDATE...SET...WHERE col IN (SELECT...) and PostgreSQL uses UPDATE...FROM...WHERE.
व्याख्या (हिन्दी)
जॉइन के साथ अपडेट करें: ऑर्डर अपडेट करें ओ ग्राहकों से जुड़ें सी ऑन ओ.कस्ट_आईडी=सी.आईडी सेट ओ.डिस्काउंट=0.1 जहां सी.टीयर=गोल्ड। किसी अन्य तालिका से ग्राहक स्तर के आधार पर ऑर्डर छूट को अद्यतन करता है। MySQL सिंटैक्स मानक SQL से भिन्न है जो UPDATE...SET...WHERE col IN (SELECT...) का उपयोग करता है और PostgreSQL UPDATE...FROM...WHERE का उपयोग करता है।