AdventureWorks Database: Fetch any distinct values from left query of EXCEPT that aren't present in the query to the right
SQL Query - AdventureWorks: Exercise-134 with Solution
134. From the following tables write a query in SQL to fetch any distinct values from the left query that aren't also present in the query to the right.
Sample table: production.Product
Sample table: production.WorkOrder
SELECT ProductID FROM Production.WorkOrder EXCEPT SELECT ProductID FROM Production.Product ;
productid| ---------+ N.B. : No result returns here
SQL AdventureWorks Editor:
Contribute your code and comments through Disqus.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
SQL: Tips of the Day
How to avoid the "divide by zero" error in SQL?
Select Case when divisor=0 then null Else dividend / divisor End ,,,
Select dividend / NULLIF(divisor, 0) ...
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook