我有两条指令,我需要一条 SQL 指令在 2 列中返回。
Column 1: Subfolders.
Column 2: Main folders of this subfolders.
--主文件夹
select distinct folder_path as 'main_folder'
from X
where folder_path like '%\' order by folder_path
--返回6行
--子文件夹
select distinct folder_path as 'sub_folder'
from X
where folder_path not like '%\' order by folder_path
--返回14行