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).

bye
hans van dalen


At 15:37 15-10-03 +0200, you wrote:
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: http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to