摘要: 以查询组织结构为例: 表结构如下 查询递归的组织结构的SQL语法如下: with myTable as ( select * from Depart where did = 1 union all select Depart.* from myTableinner join Depart on myTable.did = Depart.pid)select * frommyTable查询结果: 阅读全文
posted @ 2012-03-31 11:38 沙中一粒 阅读(169) 评论(0) 推荐(0)