Skip to content
Advertisement

Parent – child sql query with in a single table

I’ve a table:

I want to select records whose parentid not equal to zero, with parent record(parent record have parentid = 0, but some parent record don’t have child record I want to skip them )

Advertisement

Answer

Try this:

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