mysql - How to retrieve all of the records which dont have any reference in another table? -


  तालिकाआ आईडी, नाम 1, एबीसी 2, सीडी 3, डेफ टेबलब आईडी, टेबलएआईडी, विषय 1, 1, Blah 2, 1, blah again 3, 2, abcdef  

मैं TableA से उन सभी रिकॉर्ड का चयन करना चाहता हूं जो तालिका में कोई संदर्भ नहीं है I मैं इसे Mysql में कैसे कर सकता हूं?

बहुत बहुत धन्यवाद।

आप कर सकते हैं LEFT JOIN का उपयोग करें और इन रिकॉर्ड का चयन करें, जो बी में मेल नहीं खाते हैं।

  SELECT TableA। * से टेबल ले जाने से TableB पर TableB.TableA_id = TableA.id जहां TableB.id NULL है  

Comments

Popular posts from this blog

Is there an open source WebSockets (JavaScript) XMPP library? -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

mysql - Can mysql_pconnect be called multiple times in one php page? -