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

SQl Êý¾Ý¿âÏà¹Ø²Ù×÷

1£º
Sql server 2005ÈÕÖ¾ÎļþÌ«´ó,ʹÆä¼õСµÄ·½·¨
ÔËÐÐÏÂÃæµÄÈýÐÐ PMDataCenter  ΪÊý¾Ý¿âÃû:
backup log PMDataCenter with NO_LOG
backup log PMDataCenter with TRUNCATE_ONLY
DBCC SHRINKDATABASE(PMDataCenter)


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

Sql Server×Ö¶ÎÀàÐ͵Ä×Ö·û³¤¶È

sql serverÊý¾ÝÀàÐÍcharºÍnchar,varcharºÍnvarchar,textºÍntextÔÊÐíµÄ×Ö·û³¤¶È
×Ö·û´®
char
¹Ì¶¨³¤¶ÈµÄ·Ç Unicode ×Ö·ûÊý¾Ý£¬×î´ó³¤¶ÈΪ 8,000 ¸ö×Ö·û¡£
varchar
¿É±ä³¤¶ÈµÄ·Ç Unicode Êý¾Ý£¬×Ϊ 8,000 ¸ö×Ö·û¡£
text
¿É±ä³¤¶ÈµÄ·Ç Unicode Êý¾Ý£¬×î´ó³¤¶ÈΪ 2^31 - 1 (2,147,483,647) ¸ö×Ö·û¡£
Unicode ×Ö·û´® ......

Sqlº¯Êý´óÈ«

--¾ÛºÏº¯Êý
use pubs
go
select avg(distinct price)  --Ëãƽ¾ùÊý
from titles
where type='business'
go
use pubs
go
select max(ytd_sales)  --×î´óÊý
from titles
go
use pubs
go
select min(ytd_sales) --×îСÊý
from titles
go
use pubs
go
select type,sum(price),sum(advance)  ......

sql server ϵͳº¯ÊýÓ÷¨ÊµÀý

ϵͳº¯Êý
1.case when ... then ..else ..end(ÓÃÓÚ¶ÔÌõ¼þ½øÐвâÊÔ)
e.Select id,case when name='deepwishly' then 'ÀÏ´ó' else 'ÆäËû' end as Type
 ÏÔʾ id  type
          1   ÀÏ´ó
2.cast()/convert() Ç°Õß¾ßÓÐANSI SQL-92¼æÈÝÐÔ£¬ºóÕß¹¦ÄܸüÇ ......

Sql server 2005 µÇ¼ɨä

1.       ÔÚʹÓÃsql server ֮ǰÄØ£¬×îºÃ¶ÔÆä½øÐÐÅäÖÃ
(1)  ÅäÖù¤¾ß->Sql server configuration Manager  
        Ñ¡ÔñSql server 2005Íø·ÅäÖà Ï嵀 MSSQLSERVERµÄЭÒé ÔÚ´°¿ÚÓұߵÄ
TCP/IPЭÒéÓÒ¼üÊôÐÔ£¬ÅäÖÃÈçÏÂ
 
&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ