0

I have the following scenario:

I would like to return all manual name from the table Manual that belong to userID of 1.

Also if there is a subManualId I would need to query this table over so that I could get this subManual Name from the same Manual table.

So my result should be:

Test (There is NoSubmanual) so just display the name Test

Test1 > Test3 > Test4 (Test1 as a Submanual Test3 and Test3 as a Submanual Test4)

I'm not sure on how to really tackle this problem...

Table: MANUAL

manualId        Name       SubManualId   userID
    1123        Test                          1
    1124        Test1       1125              1          
    1125        test3       1126              1
    1126        test4                         1
    1127        Test5
yaguyon
  • 1
  • 1
  • Edit question to show table of desired output based on given source data. Most likely you just need to include MANUAL table in the query linking to SubManualID field. This is a self-join. – June7 Apr 16 '22 at 21:50
  • Does this answer your question? [Explanation of self-joins](https://stackoverflow.com/questions/2458519/explanation-of-self-joins) – June7 Apr 16 '22 at 21:53
  • please share the expected output from above result set. – Amit Verma Apr 17 '22 at 04:19

0 Answers0