How to get result of one sql and subtract the result of another sql dynamically in MsSql server. If you are aware of the MINUS keyword used in oracle.
like
select emp_id from employee where dept='MANUFACTURING'
minus
select emp_id from employee where emp_ctgry='SUPERVISOR'
This will list out the employees which are not under SUPERVISOR category.
How to do similar job in MsSql, where you can not use MINUS as it is not MsSql specific ?
The answer is you will need to use 'EXCEPT' keyword, which is equivalent to MINUS in Oracle.
I'm not very sure but as per my knowledge MsSql 6.5 does not support MINUS operator.
Subscribe to:
Post Comments (Atom)
SpringBoot: Features: SpringApplication
Below are a few SpringBoot features corresponding to SpringApplication StartUp Logging · To add additional logging during startup...
-
There was a requirement in which user should be able to download an excel report from application, make some amendments and upload the exce...
-
I was facing 'java.rmi.NoSuchObjectException: Bean has been deleted' for the stateful bean instance. While reading about the error, ...
-
What Is a WebLogic Server Cluster? A WebLogic Server cluster consists of multiple WebLogic Server server instances running simultaneously an...
No comments:
Post a Comment