sql server - SQL join multiple tables - result set not expected -
I am working in SQL Server 2008. I have 4 tables that I want. Give us A, B, C, and D. B, C, and D all subsets of Table A are called. There are some records that are common in B, C, and D. My goal is to select all records that are not in B, C, or D. So, I think that is the right query to run:
Select one from Ax at the x less than X = = add on the DO on left x = = () and ( The problem I have is that I know there are some records in Table B which in this result set Those who are returning should not be there. (It can hold tables for C and D with the same.) So, some should be wrong in my query. My best estimate is that the matches are unclear. The first one should give me all records in A which are not in B Similarly, the second should give me all records in A which are not in C Because I have used it in the WHERE section and I must return only to the records which are common to everyone, but something is going wrong, how can I fix it?
Try it:
Select one of SELECT x Select from union from B (Select from union with h from choosing union from i) T (x)
Comments
Post a Comment