select Column_ID,Column_Name,Parent_ID,(select Column_Name from [Sort] where Column_ID=a.Parent_ID) Parent_Name,
(select Parent_ID from [Sort] where Column_ID=a.Parent_ID) Fathers_ID,
(select Column_Name from [Sort] where Column_ID=(select Parent_ID from [Sort] where Column_ID=a.Parent_ID)) Father_Name
from [sort] a where Column_Depth=3 order by father_Name desc,Parent_Name desc,Column_Name desc
比较牛B的sql语句,可以嵌套查询,还可以根据临时字段名排序