Create view to know missing records between two tables I have two tables, Tab_A is a template that generate Tab_B.
Tab_A:
ID,
ORDER,
ASSEMBLY,
DESCRIPTION.

Tab_B:
ID,
ORDER,
ASSEMBLY,
DESCRIPTION.

Tab_B in same situation might have less records then his template Tab_A.

How can I create a view to know less records?
Best regards
This should do it if you are using Microsoft SQL Server:

CREATE VIEW SomeView
AS
SELECT ID, ORDER, ASSEMBLY
FROM Tab_A a
WHERE NOT EXISTS (SELECT NULL FROM Tab_B b WHERE a.ID = b.ID);


If you want to know how many are different, then:

SELECT COUNT(*) FROM SomeView;