Home How to find all entries with reference to yourself?

# How to find all entries with reference to yourself?

Nips
1#
Nips Published in 2017-09-13 10:40:03Z
 I have table with id and parent_id fields and I want to show all entries with reference to yourself, something like this: select * from mytable where id=parent_id;  How to do this?
Kristofer
2#
 You can do it with an inner join: SELECT * FROM mytable m1 INNER JOIN mytable m2 ON m2.id = m1.parent_id