Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ËÙ¶ÈÒª¿ì


Ïà¹ØÎĵµ£º

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 server 2008 ·ÖÇø±íÎÊÌâ

    ¹«Ë¾Óиö±¨±íϵͳÏìÓ¦ËٶȲ»ÊǺÜÀíÏ룬µ÷Óŵ÷Á˺ü¸´Î£¬ÓеãЧ¹û£¬µ«²»ÊǺÜÈÃÈËÂúÒâ¡£×î½üÓÖ¿ªÊ¼µ÷ÓÅ£¬ÊÔÁËÊÔsql server 2008µÄ·ÖÇø±í¹¦ÄÜ£¬¿´¿´ÊDz»ÊÇ·ÖÇøÖ®ºóËÙ¶È¿ÉÒÔ¿ìÒ»µã¡£
    ÓÃÁËÒ»¸ö°ÙÍò¼¶Êý¾ÝµÄ»ã×ܱíÀ´×ö·ÖÇø£¬·ÖÇøµÄÏë·¨Êǰ´ÔÂÀ´·ÖÇø£¬Ò»¸ö·ÖÇø´æ´¢Ò»¸öÔµÄÊý¾Ý£¬Ò»¸ö·ÖÇøµ ......

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 ......

DateDiff: SQL serverº¯Êý

 ·µ»Ø Variant (Long) µÄÖµ£¬±íʾÁ½¸öÖ¸¶¨ÈÕÆÚ¼äµÄʱ¼ä¼ä¸ôÊýÄ¿¡£
¡¡¡¡Óï·¨
¡¡¡¡DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])
¡¡¡¡DateDiff º¯ÊýÓï·¨ÖÐÓÐÏÂÁÐÃüÃû²ÎÊý£º
¡¡¡¡²¿·Ö ÃèÊö
¡¡¡¡interval ±ØÒª¡£×Ö·û´®±í´ïʽ£¬±íʾÓÃÀ´¼ÆËãdate1 ºÍ date2 µÄʱ¼ä²îµÄʱ¼ä¼ä¸ô
¡¡¡¡Date1 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ