现在的位置: 首页 > 综合 > 正文

嵌套查询sql语句例子

2013年01月08日 ⁄ 综合 ⁄ 共 440字 ⁄ 字号 评论关闭

嵌套查询例子

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

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

抱歉!评论已关闭.