hibernate - Join same table and fetch sub folders in mysql query -


I have a table to save "folders" in the document management system.

So I need to recover all folders ID from a folder id. E, the sub folders list of a folder.

Is it possible to join self in the same query?

try

  from the folders to choose d.folder_id d In, for folders e where d.parent_id = e.folder_id    

Comments

Popular posts from this blog

sql - Return Function using Cursor -

sql server - How to use pivot in this table -

javascript - Is there any way to add a new parameter to a function programmatically? -