Query to get jobs from EMP table
Output:
There are 14 records in EMP table.
1.
Query to
get unique records using DISTINCT keyword
Output:
2. Query to get unique records using UNIQUE keyword
Output:
3. Query to get unique records using GROUP BY clause
Output:
Here we can see
count(*) column having 13 records, another one employee does not have any jobs
so that should be null.
4. Query to get unique records using UNION operator
Output:
Another example in Union operator:
Output:
5. Query to get unique records using INTERSECT operator
Output:
6. Query to get unique records using MINUS operator
Output:
7. Query to get unique records using SUBQUERY
Output:
No comments:
Post a Comment