Sqlserver does not support set difference and intersection operations.
I recently developed a database based on sqlserver2000.Program. There is a part of the computation that requires a large number of aggregate queries. I found a query operation statement through the data.
Except
The syntax structure is:
(Sql1)
Except
(Sql2)
However, no matter how I execute it, an error occurs:
There is a syntax error near the keyword 'couldn t'
My analysis is that since minus (set difference calculation) in Oracle is also used in this way, it should be no problem to use it like this. But it cannot. No way. I checked a lot of information on the Internet and on the csdn forum. It indicates that sqlserver does not support this set operation at all, and only supports the union operation ). We need to use the not in statement to create the intersection and difference set of the set. We all know that the not in statement has poor performance. Moreover, it is not easy to use such statements as minus. I really don't know.
Is SQL server really worse than oracle? What is the difference?