Last active
December 19, 2015 21:48
-
-
Save PoTHuYJoHN/6022244 to your computer and use it in GitHub Desktop.
Get elements from the same table where parent_id does not exists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM help as t1 left JOIN help as t2 ON t1.parent_id = t2.id WHERE t2.id IS NULL AND t1.isCategory = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment