Sub query

When you want data based on two tables, it doesn't mean that you have to perform JOIN always.



Below query gets the details(Id,Name,Description) of product, which are not sold event once.

Approach:
Try to convert this English in to logic of columns, like all product.id, which are not present in sales.productId

Generally sub-query/inner query results are fed in to outer queries.




Comments

Popular posts from this blog

Oracle User vs Oracle Schemas

Having and Where Clause