In this blog, I would like to provide a basic introduction to the Except set operator function which has been introduced with HANA 1.0 SPS07. This blog provides basic understanding of what is Except set operator function and how to write a simple Except set operator function. On following this blog, I feel any reader would be able to write simple Except set operator function.
Let me first try to explain the use of the SQL EXCEPT clause/operator - the Except set operator function is used to combine two SELECT statements and returns rows from the first SELECT statement that are not returned by the second SELECT statement. In other words, it only returns rows from the first SELECT, which are not available in the second SELECT statement.
The syntax of Except set operator function is:
SELECT column1 [, column2] FROM table1 [, table2] [WHERE condition]
EXCEPT
SELECT column1 [, column2] FROM table1 [, table2] [WHERE condition]
For Example:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
10 | |
8 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 |