嵌套查询sql语句例子

嵌套查询例子

SELECT C_ID,isnull(FirstSort,'')+'-'+isnull(SecSort,'')+'-'+isnull(Sort,'') SortValue,isnull((select Column_Name from Sort with (nolock) where Column_ID=EnterpriseLibrary.FirstSort),'')+'>>'+isnull((select Column_Name from Sort with (nolock) where Column_ID=EnterpriseLibrary.SecSort),'')+'>>'+isnull((select Column_Name from Sort with (nolock) where Column_ID=EnterpriseLibrary.Sort),'') SortPath FROM EnterpriseLibrary  with (nolock) where C_ID=@C_ID

红色标记的为嵌套查询例子

原文地址:https://www.cnblogs.com/bestsaler/p/1835696.html