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


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

SQL ÓÐÌõ¼þµØɸѡÖظ´Êý¾Ý

 --»ù´¡Á˽⣺
1) select distinct name from table --´ò¿ªÖظ´¼Ç¼µÄµ¥¸ö×Ö¶Î
2) select * from table where fid in(Select min(fid) from table group by name)--´ò¿ªÖظ´¼Ç¼µÄËùÓÐ×Ö¶ÎÖµ
3) select * from table where name in(select name from table group by name having count(name)=1)--´ò¿ªÖظ´ÈÎÒâ´ÎÊýµ ......

DBA³£ÓÃsql(Ò»)

--¼à¿ØË÷ÒýÊÇ·ñʹÓà alter index &index_name monitoring usage; alter index &index_name nomonitoring usage; select * from v$object_usage where index_name = &index_name;
--ÇóÊý¾ÝÎļþµÄI/O·Ö²¼ select df.name,phyrds,phywrts,phyblkrd,phyblkwrt,singleblkrds,readtim,writetim from v$filestat fs,v ......

linq to sql Ïê

×î½üѧϰ linq to sql ¸Ð¾õ»¹ÊÇ¿ÉÒԵģ¬·½±ã¿ì½Ý£¬ÒÔÇ°ÎÊÊÇÒÔΪ²»ºÃÓ㬲»ÏëÓ㬵«ÊǽñÌìÓÃÁËһϸоõ»¹ÊDz»´íµÄ£¬ ȷʵÊǿ죬µ«ÊÇÎÒÓÖÔÚÏë
Èç¹û³ö´íÁËÔõô°ì£¬ÕâÑùÒ»¸öÀàÀï·ÅÄÇô¶àµÄÎļþÊÇÓе㲻ºÃ£¬ÔÙ˵ÁË linq to sql µÍ²ã²»ÖªµÀÔõôʵÏֵģ¬»¹ÊÇûÓÐ×Ô¼ºÐ´µÄ·ÃÎʸоõÊæ·þµãºÇºÇ£¡£¡£¡
Èç¹ûÊÇ¿ìËÙ¿ª·¢ÓÃ&nb ......

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ºÅ