Thursday, 3 October 2013

Fetching records from two tables

Fetching records from two tables

I hve two tables ...i need to fetch the records from the two table..no
record should be missed useing MySql
Ex: table-1 prod_id Name date 1 a 01-09-13 2 b 02-09-13 3 c 03-09-13 3 c
05-09-13
table-2 prod_id Name date 1 a 01-09-13 2 b 01-09-13 3 c 04-09-13
out put:
t1.prod_id t1.name t2.prod_id t2.name date 1 a 1 a 01-09-13 - - 2 b
01-09-13 2 b - - 02-09-13 3 c - - 03-09-13 - - 3 - 04-09-13 3 c - -
05-09-13

No comments:

Post a Comment