Hi Friends
I have a table XXX and 2 columns are there. One of Item_ID and another column is Product_ID.
Below is the table data for those 2 columns. For example: I1 (Item1) is tagged with P1 (Product1) and P1 is tagged with I2 & I3 etc.,
I want to write the query to return all the rows if I pass the value as I1 in the SQL query. Because I1 is the root value for this data. Likewise query should work if we pass input as I2 and should return last 2 rows.
Table Data:
------------
Item ID-------> Product_ID
I1--------> P1
P1------> I2, I3
I2-------> P2, P3
P2------>I3, I4
.
.
.
etc.,