sql笔记

with tab as
(
 select a.Id,a.ParentId,a.Name,a.Vieworder from dbo.Area a 
 where Id in(select Id from Area a where a.Name like '%科尔%')--=421381--子节点
 union all
 select b.Id,b.ParentId,b.Name,b.Vieworder
 from
  tab a,--子节点数据集
  dbo.Area b  --父节点数据集
 where a.ParentId=b.Id  --子节点数据集.parendID=父节点数据集.ID
)
select distinct Id,ParentId,Name,Vieworder from tab ;

以上是从网上找来,模糊找name时,把它所有父节点找出来。

<html>
<head>
    <title>系统</title>
    @Html.Partial("CommonJSAndCSS")
</head>

CommonJSAndCSS 位于/Views/Shared 下

<link href="@Url.Content("~/Styles/test.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.8.0.min.js")" type="text/javascript"></script>
用对方法才有效率,做对事情才有效果
“麻烦”是自己“处理”不当的结果
“困难”是自己“学习”不够的反射

“挫折”是自己“努力”不足的代价

原文地址:https://www.cnblogs.com/ly7454/p/3008785.html