There are two same structure table in Database i.e. Table A and B. Table A contains 100 records and Table B contain 50 records which is already in Table A. Write a sql query find records in Table A which is not in Table B (don't use "in" operator and subquery)
SELECT a.* FROM Table1 A LEFT JOIN Table2 B ON A.name = B.name WHERE B.Name IS NULL
--Take a note...your selected columns in both tables should be same, here i am assuming as per your input SELECT * from A MINUS SELECT * FROM B --if require put where clause
MINUS
select * from dbo.TableA A FULL OUTER JOIN dbo.TableB B ON A.ColName=B.ColName where B.ColName is null
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)