How to compare a table against a table variable in a Stored Procedure? Normally to compare the two tables we used this query:
SELECT *
FROM Table A
WHERE NOT EXISTS(SELECT *
FROM Table B
WHERE Table A.ID = Table B.ID)
But here, I have Table A and one table variable @Item like Table B.
In this scenario, how to compare Table A and @Item?
I am writing one stored procedure, in that stored procedure I want to compare the existing one table with the table variable which is generated from the front end and passed as a XML dataset to the Stored Procedure…
In that, if all the rows in the table variable @Item presents in the existing table then it returns true else false…
Any suggestions please….
If works just the same (altough using table aliases will make it easier)