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

SQLʱ¼äº¯ÊýÏê½â

1. µ±Ç°ÏµÍ³ÈÕÆÚ¡¢Ê±¼ä
select getdate() 
2. dateadd ÔÚÏòÖ¸¶¨ÈÕÆÚ¼ÓÉÏÒ»¶Îʱ¼äµÄ»ù´¡ÉÏ£¬·µ»ØеĠdatetime Öµ
ÀýÈ磺ÏòÈÕÆÚ¼ÓÉÏ2Ìì
select dateadd(day,2,'2004-10-15') --·µ»Ø£º2004-10-17 00:00:00.000
3. datediff ·µ»Ø¿çÁ½¸öÖ¸¶¨ÈÕÆÚµÄÈÕÆÚºÍʱ¼ä±ß½çÊý¡£
select datediff(day,'2004-09-01','2004-09-18') --·µ»Ø£º17
4. datepart ·µ»Ø´ú±íÖ¸¶¨ÈÕÆÚµÄÖ¸¶¨ÈÕÆÚ²¿·ÖµÄÕûÊý¡£
SELECT DATEPART(month, '2004-10-15') --·µ»Ø 10
5. datename ·µ»Ø´ú±íÖ¸¶¨ÈÕÆÚµÄÖ¸¶¨ÈÕÆÚ²¿·ÖµÄ×Ö·û´®
SELECT datename(weekday, '2004-10-15') --·µ»Ø£ºÐÇÆÚÎå
6. day(), month(),year() --¿ÉÒÔÓëdatepart¶ÔÕÕÒ»ÏÂ
select µ±Ç°ÈÕÆÚ=convert(varchar(10),getdate(),120)
,µ±Ç°Ê±¼ä=convert(varchar(8),getdate(),114)
select datename(dw,'2004-10-15')
select ±¾ÄêµÚ¶àÉÙÖÜ=datename(week,'2004-10-15')
,½ñÌìÊÇÖܼ¸=datename(weekday,'2004-10-15')
º¯Êý ²ÎÊý/¹¦ÄÜ 
GetDate( ) ·µ»ØϵͳĿǰµÄÈÕÆÚÓëʱ¼ä 
DateDiff (interval,date1,date2) ÒÔinterval Ö¸¶¨µÄ·½Ê½£¬·µ»Ødate2 Óëdate1Á½¸öÈÕÆÚÖ®¼äµÄ²îÖµ date2-date1 
DateAdd (interval,number,date) ÒÔintervalÖ¸¶¨µÄ·½Ê½£¬¼ÓÉÏnumberÖ®ºóµÄÈÕÆÚ 
DatePart (interval,date) ·µ»ØÈÕÆÚdateÖУ¬intervalÖ¸¶¨²¿·ÖËù¶ÔÓ¦µÄÕûÊýÖµ 
DateName (interval,date) ·µ»ØÈÕÆÚdateÖУ¬intervalÖ¸¶¨²¿·ÖËù¶ÔÓ¦µÄ×Ö·û´®Ãû³Æ 
²ÎÊý intervalµÄÉ趨ֵÈçÏ£º
Öµ Ëõ Ð´£¨Sql Server£© Access ºÍ ASP ËµÃ÷ 
Year Yy yyyy Äê 1753 ~ 9999 
Quarter Qq q ¼¾ 1 ~ 4 
Month Mm m ÔÂ1 ~ 12 
Day of year Dy y Ò»ÄêµÄÈÕÊý,Ò»ÄêÖеĵڼ¸ÈÕ 1-366 
Day Dd d ÈÕ£¬1-31 
Weekday Dw w Ò»ÖܵÄÈÕÊý£¬Ò»ÖÜÖеĵڼ¸ÈÕ 1-7 
Week Wk ww ÖÜ£¬Ò»ÄêÖеĵڼ¸ÖÜ 0 ~ 51 
H


Ïà¹ØÎĵµ£º

±È½ÏÅ£µÄSQL ServerÊé

Microsoft SQL Server2005¼¼ÊõÄÚÄ»:T-SQL³ÌÐòÉè¼Æ
http://www.amazon.cn/mn/detailApp/ref=sr_1_25?_encoding=UTF8&s=books&qid=1261538877&asin=B0011C2568&sr=8-25
Microsoft SQL Server 2005¼¼ÊõÄÚÄ»£º²éѯ¡¢µ÷ÕûºÍÓÅ»¯
http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&am ......

SQL´æ´¢¹ý³Ì ¸ÅÊö

1.sql´æ´¢¹ý³Ì¸ÅÊö
2.SQL´æ´¢¹ý³Ì´´½¨
3.sql´æ´¢¹ý³Ì¼°Ó¦ÓÃ
4.¸÷ÖÖ´æ´¢¹ý³ÌʹÓÃÖ¸ÄÏ
5.ASPÖд洢¹ý³Ìµ÷ÓõÄÁ½ÖÖ·½Ê½¼°±È½Ï
6.SQL´æ´¢¹ý³ÌÔÚ.NETÊý¾Ý¿âÖеÄÓ¦ÓÃ
7.ʹÓÃSQL´æ´¢¹ý³ÌÒªÌرð×¢ÒâµÄÎÊÌâ
1.sql´æ´¢¹ý³Ì¸ÅÊö
ÔÚ´óÐÍÊý¾Ý¿âϵͳÖУ¬´æ´¢¹ý³ÌºÍ´¥·¢Æ÷¾ßÓкÜÖØÒªµÄ×÷Óá£ÎÞÂÛÊÇ´æ´¢¹ý³Ì»¹ÊÇ´¥·¢Æ÷£¬¶¼ÊÇSQL Óï ......

MS SQL 2005Á´½Ó·þÎñÆ÷Á¬½ÓÔ¶³ÌORACLEÈ«¹ý³Ì

µÚÒ»²½:ÏÂÔØ°²×°Oracle 10g Release 2 ¿Í»§¶ËÈí¼þ,ÏÂÔØÁ¬½ÓÊÇ:
http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
ÏÂÔغó°²×°
 
 
 
µÚ¶þ²½:ÏÂÔØ°²×°Oracle ODAC,ÏÂÔØÁ¬½ÓÊÇ:
http://download.oracle.com/otn/other/ole-oo4o/ODAC1020221.exe
 
µÚÈý²½: ÖØÆôMS SQ ......

[Sql Server2008]Ê÷½á¹¹µÄµÝ¹éËã·¨

±¾ÎÄÖ÷Òª½²ÊöÈý¸öÄÚÈÝ£º
1.ÈçºÎ´´½¨hierarychyidµÄ±í£¬²åÈëÊý¾Ý¼°»ù±¾µÝ¹é²éѯ¡£
2.½éÉÜhierarchyidµÄ10ÖÖרÓк¯Êý¡£
3.½éÉÜhierarchyidÌØÓеÄÉî¶ÈÓÅÏÈË÷Òý(Depth-First Indexing)ºÍ¹ã¶ÈÓÅÏÈË÷Òý(Breadth-First Indexing)
ÔÚÉÏÒ»½ÚÖÐ
http://blog.csdn.net/tjvictor/archive/2009/07/30/4395677.aspx
ÎÒÃÇÒѾ­ÑÝ ......

SqlÈÕÖ¾ÇåÀí

ÈÕÖ¾ÎļþÂú¶øÔì³ÉSQLÊý¾Ý¿âÎÞ·¨Ð´ÈëÎļþʱ£¬¿ÉÓÃÁ½ÖÖ·½·¨£º
¡¡¡¡Ò»ÖÖ·½·¨£ºÇå¿ÕÈÕÖ¾¡£
¡¡¡¡1£®´ò¿ª²éѯ·ÖÎöÆ÷£¬ÊäÈëÃüÁî
¡¡¡¡DUMP TRANSACTION Êý¾Ý¿âÃû WITH NO_LOG
¡¡¡¡2.ÔÙ´ò¿ªÆóÒµ¹ÜÀíÆ÷--ÓÒ¼üÄãҪѹËõµÄÊý¾Ý¿â--ËùÓÐÈÎÎñ--ÊÕËõÊý¾Ý¿â--ÊÕËõÎļþ--Ñ¡ÔñÈÕÖ¾Îļþ--ÔÚÊÕËõ·½Ê½ÀïÑ¡ÔñÊÕËõÖÁXXM,ÕâÀï»á¸ø³öÒ»¸öÔÊÐíÊÕËõµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ