易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle比较快的分页sql

 方案1 适用于oracle9i以上!
select * from
(select row_number() over(order by sendid desc) rn,m.* from xxt_msgreceive m )
where rn <1010 and rn>=1000
方案2
SELECT * from (SELECT A.*, ROWNUM RN from (SELECT * from xxt_msg where sendstatus=1  order by msgid desc) A WHERE ROWNUM <= 4010)WHERE RN >=4000;
经测试,方案2速度要快


相关文档:

sql 2005 存储过程分页 java 代码

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--每页显示记录条数
@currentpage int output,--第几页
@orderid nvarchar(50),--主键排序
@sort int,--排序方式,1表示升序,0表示降序排列 ......

Excel VBA 实现SQL数据读取K3人员信息

Private Sub CommandButton1_Click()
Worksheets("Sheet2").Select
    Cells.Select
     Selection.Delete Shift:=xlUp
     Range("A1").Select
'清除在Excel中的数据,确保导入信息不出现与原Excel数据进行叠加
Dim cnnConnect As Object
Dim rstR ......

DBA常用sql(二)

 session状态:
STATUS VARCHAR2(8) Status of the session:
ACTIVE - Session currently executing SQL
INACTIVE - sql及其session没有释放或正常退出......
KILLED - Session marked to be killed
CACHED - Session temporarily cached for use by Oracle*XA
SNIPED - Session inactive, waiting on the clie ......

SQL语句查询数据库中重复记录的个数

一个sql语句:一个表test有四个字段id,a,b,c,如果表中的记录有三个字段a,b,c都相等,则说明这条记录是相同的,求相同的记录的个数 。
select a,b,c,count(*) from (select c.a,c.b,c.c from test c) having count(*) >= 2 group by a,b,c
或者
select zdbh,tdzl,zdmj,count(*) from ecaadmin.zdsx group by zdbh ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号