union the rows from select 1 not in select 2?

2003-10-15 Thread Victor SpÄng Arthursson
Need to find out which rows from select 1 are not present in select 2, but is it possible to make som kind of union that only returns the overlapping rows from the two selects? Sincerely Victor -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: union the rows from select 1 not in select 2?

2003-10-15 Thread Hans van Dalen
for example: Table1 contains: A and B and C Table2 contains: B and C and D all varchars The query: select A, B, C, '' as D from Table1 UNION select '' as A, B, C, D from Table2 if the values are no varchar but for example smallints then you replace the '' with 0 or whatever wich value (eg NULL).

Re: union the rows from select 1 not in select 2?

2003-10-15 Thread Hans van Dalen
Of course, But you still can see the table structure??? Hans At 16:05 15-10-03 +0200, you wrote: 2003-10-15 kl. 15.51 skrev Hans van Dalen: Table1 contains: A and B and C Table2 contains: B and C and D all varchars The query: select A, B, C, '' as D from Table1 UNION select '' as A,