Try to search your question here, if you can't find : Ask Any Question Now ?

How to reference parent value from child value within same column in sql using select statement?

HomeCategory: stackoverflowHow to reference parent value from child value within same column in sql using select statement?
Avatarjohn asked 1 month ago

I have a requirement where parent id is referencing to null but child id is referencing to parent id within the same column of a table?How to use select query to get which child values referencing to which parent Values?

Eg.
billno Pref

    |---------------------|------------------|
    |      bill no        |         ref      |
    |---------------------|------------------|
    |          1          |              
    |---------------------|------------------|
    |          2          |         1        |
    |---------------------|------------------|
    |          3          |                  |
    |---------------------|------------------|
    |          4          |         3
    |---------------------|------------------|
               5                    3
1 Answers
Best Answer
AvatarAmit answered 1 month ago
Your Answer

20 + 8 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com