mysql - Selecting items from one column based on values in another. -


मेरे पास निम्न डेटा है:

  id1, id2 1 3 1 8 1 10 1 11 2 3 2 10 2 11 3 2 3 18 3 20 4 3 4 8 5 3 5 10 5 11 5 40 5 45 5 50 6 1 6 59 6 70  

मैं नहीं आईडी 2 = 3,10,11 के साथ सभी आईडी 1 प्राप्त करें। उदाहरण के लिए, id1 = 4 केवल id2 = 3 के साथ, वापस नहीं होना चाहिए।

परिणाम होना चाहिए

  आईडी 1 1 2 5  

  चुनें भिन्न (आईडी 1 ) TBTEST कहां ID2 IN (3, 10, 11)  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -