JOIN in DB
Posted: Mon Feb 02, 2004 11:48 am
Customer
id name pay
1 ashok 2000
2 kumar 1000
3 vijay 3000
4 anand 2000
5 ragu 1000
6 ganesh 6000
7 senthil 3000
8 Henry 9000
9 Reynold's 9000
Address
id address
1 a1
1 b1
1 b3
2 a2
i want to select maximum of 2 address for each of the customer from the 2 tables
id name pay
1 ashok 2000
2 kumar 1000
3 vijay 3000
4 anand 2000
5 ragu 1000
6 ganesh 6000
7 senthil 3000
8 Henry 9000
9 Reynold's 9000
Address
id address
1 a1
1 b1
1 b3
2 a2
i want to select maximum of 2 address for each of the customer from the 2 tables