Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQL °´ÖÜ,ÔÂ,¼¾¶È,Äê²éѯͳ¼ÆÊý¾Ý

//°´×ÔÈ»ÖÜͳ¼Æ 
select to_char(date,'iw'),sum() 
from 
where 
group by to_char(date,'iw') 
//°´×ÔÈ»ÔÂͳ¼Æ 
select to_char(date,'mm'),sum() 
from 
where 
group by to_char(date,'mm') 
//°´¼¾Í³¼Æ 
select to_char(date,'q'),sum() 
from 
where 
group by to_char(date,'q') 
//°´Äêͳ¼Æ 
select to_char(date,'yyyy'),sum() 
from 
where 
group by to_char(date,'yyyy') 


Ïà¹ØÎĵµ£º

db2 µ÷ÓÃsql½Å±¾³£ÓÃÃüÁî

db2 µ÷ÓÃsql½Å±¾³£ÓÃÃüÁdb2 -tf d:\creat_table.sql  Óë  db2 -td$ -f d:\creat_table.sql
db2 -tf d:\creat_table.sql µ÷Óýű¾ÃüÁîÊÇddl²Ù×÷ 
µ±Óöµ½sqlÓï¾ä¹ý³¤£¬»òÌáʾ DB21007E  ¶ÁÈ¡¸ÃÃüÁîʱÒѵ½´ïÎļþĩβ¡£¾ÍʹÓà db2 -td$ -f d:\creat_table.sql ÃüÁî
ʹÓøÄÃüÁîÐèÒªÔÚsql½Å±¾ÖÐÒÔ$½áÊ ......

MS SQL ServerÈÕÆÚ¼ÆËã

ͨ³££¬ÄãÐèÒª»ñµÃµ±Ç°ÈÕÆںͼÆËãһЩÆäËûµÄÈÕÆÚ£¬ÀýÈ磬ÄãµÄ³ÌÐò¿ÉÄÜÐèÒªÅжÏÒ»¸öÔµĵÚÒ»Ìì»òÕß×îºóÒ»Ìì¡£ÄãÃǴ󲿷ÖÈË´ó¸Å¶¼ÖªµÀÔõÑù°ÑÈÕÆÚ½øÐзָÄê¡¢Ô¡¢Èյȣ©£¬È»ºó½ö½öÓ÷ָî³öÀ´µÄÄê¡¢Ô¡¢ÈյȷÅÔÚ¼¸¸öº¯ÊýÖмÆËã³ö×Ô¼ºËùÐèÒªµÄÈÕÆÚ£¡ÔÚÕâƪÎÄÕÂÀÎÒ½«¸æËßÄãÈçºÎʹÓÃDATEADDºÍ DATEDIFFº¯ÊýÀ´¼ÆËã³öÔÚÄãµÄ³ÌÐò ......

SQL ServerÖÐcaseµÄÓ÷¨

µÚÒ»ÖÖÓ÷¨£º
SELECT (CASE type WHEN 'u' THEN 'Óû§±í' WHEN 's' THEN 'ϵͳ±í' ELSE 'ÆäËû' END) AS TABLEKIND,* from SYSOBJECTS
µÚ¶þÖÐÓ÷¨£º
SELECT (CASE WHEN crdate<'2006-01-01' THEN 'early' WHEN crdate<'2009-01-01' THEN 'nearly' ELSE 'now' END) AS PERIOD,* from SYSOBJECTS ......

Using Oracle Trace Analyzer (trcanlzr.sql)


Using Oracle Trace Analyzer (trcanlzr.sql)
Dave Moore:  Author of Oracle Utilities
Oracle has provided another utility initially designed for performance tuning Oracle Applications.  Trace Analyzer is provided in the form of a PL/SQL package (TRCA$ ).  The Trace Analyzer utility i ......

SQL ServerÊÓͼÖг£見ÏÞÖÆÌõ¼þ

--> Title  : SQL ServerÊÓͼÖг£見ÏÞÖÆÌõ¼þ
--> Author : wufeng4552
--> Date   : 2010-03-01
(1): ÊÓͼÊý¾Ý¸ü¸ÄµÄ³£見ÏÞ¶¨
µ±Óû§¸üÐÂÊÓͼÖеÄÊý¾Ýʱ,Æäʵ¸ü¸ÄµÄÊÇÆä¶ÔÓ¦µÄÊý¾Ý±íµÄÊý¾Ý.ÎÞÂÛÊǶÔÊÓͼÖеÄÊý¾Ý½øÐиü¸Ä,»¹ÊÇÔÚÊÓͼÖвåÈë»òÕßɾ³ýÊý¾Ý,¶¼ÊÇÀàËƵĵÀÀí.µ«ÊÇ,² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ