Skip to content
Advertisement

SQL query to fetch data based on column value

Is it possible to get entire data in one attempt for this scenario? I have this query where I need retrieve product name from another table.

Right now the T3.PRODUCT_NAME return value based on T2.PRODUCT_ID but what I really need is to able to retrieve data based on the value from NEW_PRODUCT_ID?

Here is my expected output:

enter image description here

Hope this makes sense.

Advertisement

Answer

You can use a subquery

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement