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

SQL Server2005±í·ÖÇø

 ---//´´½¨·ÖÇø
CREATE PARTITION FUNCTION MarketInfo_Bak_partfunc(int)
AS RANGE RIGHT
FOR VALUES (10000,25000,40000)
--//´´½¨·ÖÇø¼Ü¹¹
CREATE PARTITION SCHEME MarketInfo_Bak_partscheme
¡¡¡¡AS PARTITION MarketInfo_Bak_partfunc
¡¡¡¡TO (fg1, fg2, fg3, fg4) --//fg1...fg4Îļþ×éÃû
--//¶Ô±í½øÐзÖÇø
CREATE TABLE ±íÃû(FirstName nvarchar(40), LastName nvarchar(40), Number int)
¡¡¡¡ON MarketInfo_Bak_partscheme (Number)
----///////ʵ¼ù²Ù×÷
ÕâÀï½øÐжÔsql server 2005±í·ÖÇøÒ»´Îʵ¼ù²Ù×÷£¬Õâ´ÎÊý¾ÝµÄÇ°Ì᣺ÓÐÕâôһ¸öLog±í£¬Êý¾ÝÁ¿´ó¸ÅÊÇÁ½Ç§¶àÍòÌõ£¬Ö»±£ÁôÁù¸öÔÂÒÔÄÚµÄÊý¾Ý¡£±íÀïÓÐÁÐLogTime£¬¼Ç¼ÈÕÖ¾µÄʱ¼ä¡£
          ·ÖÎö£º¶ÔLog·Ö³É6¸öÇø£¬·Ö±ðΪPG1£¬PG2£¬PG3...PG6£»Ã¿¸öÇøÖ»´æ´¢Ò»¸öÔ·ݵÄÊý¾Ý£¬ÒÔLogTimeΪ·Ö½çµã(ÍƼöÕâ6¸öÇø·Ö±ð·ÅÔÚ²»Í¬µÄÎïÀíÓ²ÅÌÉÏ)
          ²½Ö裺
                 1.ΪÊý¾Ý¿â[TestDB]Ìí¼Ó6¸öÎļþ×é¼°Îļþ×éÂß¼­Ãû³Æ£¬É趨Îļþ×é´æ·ÅµÄλÖá£ÎÒÃÇÔÝʱÉ趨ΪPG1,G2…PG6£¬Èç¹ûÎÒÃǵÄÊý¾Ý¿â´æ´¢×ŽñÄê1-6Ô·ݵÄÊý¾Ý£¬ÔòÎÒÃǵÄPG1¾Í´æ·Å1Ô·ݵÄÊý¾Ý£¬PG2¾Í´æ·Å2Ô·ݵÄÊý¾Ý£¬ÒÔ´ËÀàÍÆ£¬PG6¾Í´æ·Å6Ô·ݵÄÊý¾Ý¡£
              Alter DATABASE [TestDB]
              Add FILEGROUP [PG1]
              Alter DATABASE [TestDB]
              Add FILE( NAME = N'PG1', FILENAME = N'E:\Database\PG1.ndf' , SIZE = 5242880KB , MAXSIZE = UNLIMITED, FILEGROWTH = 102400KB ) To FILEGROUP [PG1]
ÉÏÃæÖ»Áгö´´½¨PG1µÄ´úÂ룬ÒÀ´Î´´½¨PG2,PG3...PG6
               2.´´½¨·ÖÇøº¯Êý:
              Create Partition Function [Data Partition Rang


Ïà¹ØÎĵµ£º

SQL ServerÈÕÆÚ´¦ÀídatetimeºÍdateÖ®¼äµÄÏ໥ת»»

 
ÈÕÆÚÀàÐ͸ÅÊö
SQL ServerÖеÄÈÕÆÚÀàÐÍ°üÀ¨datetimeºÍsmalldatetime£¬½öÄÜ´¦Àí¿ÉÒÔʶ±ðΪ1753Äê¡«9999Äê¼äµÄÈÕÆÚµÄÖµ£¬Ã»Óе¥¶ÀµÄÈÕÆÚÐÍ»òʱ¼äÐÍ¡£
1£®datetime
datetimeÀàÐÍ´¦Àí´Ó1753Äê1ÔÂ1ÈÕ¡«9999Äê12ÔÂ31ÈÕµÄÈÕÆÚºÍʱ¼äÊý¾Ý£¬¾«È·¶ÈΪ°Ù·ÖÖ®ÈýÃë¡£
¼´£º¶ÔÓÚ0.000¡«0.001¡¢0.009µÄÈÕÆÚÖµ£¬µ÷ÕûΪ0.000£»¶ÔÓÚ ......

SQL³£Óú¯Êý¼¯½õ 1

Ò»¡¢×Ö·ûת»»º¯Êý
1¡¢ASCII()
·µ»Ø×Ö·û±í´ïʽ×î×ó¶Ë×Ö·ûµÄASCII ÂëÖµ¡£ÔÚASCII£¨£©º¯ÊýÖУ¬´¿Êý×ÖµÄ×Ö·û´®¿É²»ÓÑ’À¨ÆðÀ´£¬µ«º¬ÆäËü×Ö·ûµÄ×Ö·û´®±ØÐëÓÑ’À¨ÆðÀ´Ê¹Ó㬷ñÔò»á³ö´í¡£
2¡¢CHAR()
½«ASCII Âëת»»Îª×Ö·û¡£Èç¹ûûÓÐÊäÈë0 ~ 255 Ö®¼äµÄASCII ÂëÖµ£¬CHAR£¨£© ·µ»ØNULL ¡£
3¡¢LOWER()ºÍ ......

ÔÚ×öSQL¹ÊÕÏתÒÆȺ¼¯µÄʱºòÓ¦¸ÃÑ¡ÔñÄÄÖÖģʽ£¿

Èç¹ûÎÒÃǵÄSQL ServerÒª±£Ö¤¸ß¿ÉÓÃÐÔ£¬ÄÇô¿ÉÒÔ²ÉÓùÊÕÏתÒÆȺ¼¯¡£×î¼òµ¥µÄ¹ÊÕÏתÒÆȺ¼¯ÊÇÁ½Ì¨·þÎñÆ÷£¬Ò»Ì¨×ö»î¶¯µÄ·þÎñÆ÷£¬Áíһ̨×ö±¸Ó÷þÎñÆ÷£¬Õâ¾ÍÊÇAPģʽµÄCluster¡£ÁíÍâÒ»¸öģʽ¾ÍÊÇAAģʽ£¬Ò²¾ÍÊÇÁ½Ì¨·þÎñÆ÷¶¼ÊÇÔËÐÐSQL ServerʵÀý¡£
SQL Server²»ÏñOracleÒ»ÑùÓÐRAC£¬ËùÒÔ²»¿ÉÄÜ˵Á½Ì¨·þÎñÆ÷ͬʱÔËÐÐͬһ¸öʵÀý£¬Ïë ......

SQLº¯ÊýÖ®ËÄÉáÎåÈë

SQLº¯ÊýÖ®ËÄÉáÎåÈ루ת×Ôhttp://ln1058.javaeye.com/blog/191502£©
ÎÊÌâ1£º
SELECT CAST('123.456' as decimal) ½«»áµÃµ½ 123£¨Ð¡ÊýµãºóÃæµÄ½«»á±»Ê¡ÂÔµô£©¡£
Èç¹ûÏ£ÍûµÃµ½Ð¡ÊýµãºóÃæµÄÁ½Î»¡£
ÔòÐèÒª°ÑÉÏÃæµÄ¸ÄΪ
SELECT CAST('123.456' as decimal(38, 2)) ===>123.46
×Ô¶¯ËÄÉáÎåÈëÁË£ ......

ORACLEÊý¾Ý¿âÀï±íµ¼ÈëSQL ServerÊý¾Ý¿â

ORACLEÊý¾Ý¿âÀï±íµ¼ÈëSQL ServerÊý¾Ý¿â
   
  1¡¢ÔÚÄ¿µÄSQL ServerÊý¾Ý¿â·þÎñÆ÷ÉÏ°²×°ORACLE ClientÈí¼þ»òÕßORACLE ODBC Driver.
    ÔÚ$ORACLE_HOME\network\admin\tnsnames.oraÀïÅäÖÃORACLEÊý¾Ý¿âµÄ±ðÃû(service name)¡£
   
  2¡¢ÔÚWIN2000»òÕßwin200 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ