摘要:
通过sql语句递归查找所有下级或上级用户1.MS Sqlwith cte as( select Id,Pid,DeptName,0 as lvl from Department where Id = 2 union all select d.Id,d.Pid,d.DeptName,lvl+1 from cte c inner join Department d on c.Id = d.Pid)select * from cte2.Oracle 一、建表 CREATE TABLE USERS.TBL_TEST ( ID NUMBER, NAME VARCHAR2(100 BYTE), PID N 阅读全文
摘要:
SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author: cxw-- Create date: 2006/11/14-- Description: 利用Row_Number函数实现分页存储过程-- exec DividePageForROW_NUMBER 2,1,'',''-- =============================================Create PROCEDURE DivideP 阅读全文