i created a table called a i have three fields such as loan,mobilelimit,loan etc and those values are stored in the database.
loan 1000
mobile 500
tds 100
i created another table b has three fields such as loan,mobile limit and loan.
loan 1000(from a table)
mobile 500(from a table)
tds 100(from a table)
i want to retreive the a table data to the b table data.
how to do?please send the code.
Rgds,
Narasiman P.
Loading
Jignesh TrivediPosted Jul 9, 2012, 3:56 AM
Correct my understanding,
I have two tables TableA and TableB both have common field Loan, Mobile and TDS and you want to retreive TableB data with TableA data.
if it is correct then you can use Inner join to fatch record,
SELECT A.*,B.* FROM TABLEA A
INNER JOIN TABLEB B ON A.Loan = B.Loan AND A.Mobile = B.Mobile AND A.TDS = B.TDS
hope this will help you.
Rahul BhattPosted Jul 9, 2012, 2:00 AM
You need to use UNION or UNION ALL for retrive both table data
Select Loan, Mobile from TableA
UNION ALL
Select Loan, Mobile from TableB