Hi! all

Let me explain the problem:-
I have two tables A(aid,aname,adesc),B(bid,aid,bdesc).

I want a query which will extract all records of 'aid' in 'B'.
means
aid bid aname bdesc
1 1 qw eeg
2 null re null
3 4 sd v tyuy
4 null dffg null

Hope to get something soon.
Manoj

Hi,

SELECT A.AID, B.BID, A.ANAME, B.BDESC FROM A INNER JOIN B ON A.AID = B.AID

Hope that help regards.

Yap inner join is the solution since inner join will works only on common data. but one thing keep in mind that if your data volume is too high then you may go for left right join.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.