Tuesday, 17 April 2012

Sql Server

A FULL OUTER JOIN is neither "left" nor "right"— it's both!

SELECT
* FROM
@tblSource AS tblSource
FULL OUTER JOIN @tblTarget AS tblTarget ON tblTarget.ID = tblSource.ID
WHERE tblSource.ID IS NULL AND tblTarget.ID IS NOT NULL


check null to fillter rows that in both table.

No comments:

Post a Comment