Hi,
Thanks for your reply I tried your query but i'm not getting the result as expected.
I have 20 folder names in folders table and 15 folder names in permissions table.
I'm still getting only 15 folder name rows which are equal to permissions table rows.