You may need to provide more details to get any useful answers.
What are you intending to use a self join for? What is the table structure you have?
When you say "insert records dynamically", what exactly are you trying to achieve? What tables are you working with?
Generally people can't guess what you are trying to do. Your request is so general that no answer is possible.