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

SQL Server 2000 µÄϵͳÊý¾Ý¿â

SQL Server 2000 µÄϵͳÊý¾Ý¿â
SQL Server 2000·þÎñÆ÷°²×°ºó»á½¨Á¢4ϵͳÊý¾Ý¿â¡£·Ö±ðÊÇmaster¡¢model¡¢msdb¡¢tempdb¡£
1¡¢masterÊý¾Ý¿â
    masterÊý¾Ý¿âÊÇSQL Server 2000ÖÐ×îÖØÒªµÄÊý¾Ý¿â£¬¼Ç¼ÁËSQL Server 2000µÄ·þÎñÆ÷¼¶ÏµÍ³ÐÅÏ¢£¬°üÀ¨ËùÓÐÕË»§ºÍÃÜÂ룬´ÅÅ̿ռ䡢Îļþ·ÖÅäºÍʹÓá¢ÏµÍ³¼¶µÄÅäÖòÎÊý¡¢³õʼ»¯ÐÅÏ¢ºÍÆäËûÊý¾Ý¿âµÄÐÅÏ¢µÈ¡£ÓÉÓÚmasterÊý¾Ý¿â¶ÔSQL Server 2000µÄÖØÒªÐÔ£¬ËùÒÔ½¨Òé²»ÒªÖ±½ÓÐ޸ģ¬¿Éͨ¹ýϵͳ´æ´¢¹ý³ÌÀ´Ö´ÐС£
2¡¢modelÊý¾Ý¿â
    modelÊý¾Ý¿â´æ´¢ÁËËùÓÐÓû§Êý¾Ý¿âºÍtempdbÊý¾Ý¿âµÄÄ£°å¡£Ëü°üº¬½«Òª¸´ÖƵ½Ã¿¸öÓû§Êý¾Ý¿âÖÐÈ¥µÄϵͳ±í¡£
3¡¢msdbÊý¾Ý¿â
    msdbÊý¾Ý¿âÖ÷Òª±»SQL Server 2000´úÀí·þÎñÓÃÀ´½øÐи´ÖÆ¡¢ÈÎÎñµ÷¶È¼°ÒÔ¹ÜÀí¾¯±¨µÈ»î¶¯¡£
4¡¢tempdbÊý¾Ý¿â
    tempdbÊý¾Ý¿âÊÇÒ»¸öÁÙʱÊý¾Ý¿â£¬ËüΪËùÓеÄÁÙʱ±í¡¢ÁÙʱ´æ´¢¹ý³ÌÒÔ¼°ÆäËûµÄÁÙʱ²Ù×÷Ìṩ¿Õ¼ä¡£SQL Server 2000·þÎñÆ÷µÄÖØÐÂÆô¶¯¶¼»áÖØÐ½¨Á¢tempdbÊý¾Ý¿â¡£Ò²¾ÍÊÇ˵£¬tempdbÊý¾Ý¿âµÄÊý¾ÝÊÇÔÝʱµÄ£¬Ã¿´ÎÖØÆô¶¼»áµ¼ÖÂÒÔǰÊý¾ÝµÄ¶ªÊ§¡£


Ïà¹ØÎĵµ£º

sql convertÈÕÆÚʱ¼ä¸ñʽ

--²éѯÏÖÔÚÈÕÆÚ£¬Ö»ÒªÄêÔÂÈÕ
 select convert(varchar(10),getDate(),120)
--²éѯÏÖÔÚÈÕÆÚ£¬Ö»ÒªÊ±·ÖÃë
select convert(varchar(8),getDate(),8)
Convertº¯ÊýµÄһЩ˵Ã÷£¬ÒÔÏÂ×ÊÁÏÀ´Ô´ÓÚÍøÂç
²»´øÊÀ¼ÍÊýλ (yy)
´øÊÀ¼ÍÊýλ (yyyy)

±ê×¼

ÊäÈë ......

ÈçºÎÓÃSQL Óï¾ä¶ÁÈ¡DÅÌÄÚÈÝ

master..xp_dirtree   'D:\',1,1        µÚÒ»¸ö1ÊÇÉî¶È£¬µÚ¶þ¸ö1ÊÇÎļþ
1.   Ö´ÐÐ   master..xp_dirtree   'c:\',1,1,ÕâÑù¿ÉÒÔ»ñÈ¡c:\ϵÄËùÓÐÎļþºÍÎļþ¼Ð,²»°üÀ¨×ÓÎļþ¼Ð¼°Îļþ   
   
2.   ÏÔʾÔÚtreeviewÖÐ,ÓñêÖ ......

sqlÓï¾äµÄÖ´ÐÐ˳ÐòʵÀý½²½â


±ê׼˳ÐòµÄ SQL Óï¾äΪ: 
Select ¿¼ÉúÐÕÃû, max(×ܳɼ¨) as max×ܳɼ¨ 
from tb_Grade 
where ¿¼ÉúÐÕÃû is not null 
group by ¿¼ÉúÐÕÃû 
having max(×ܳɼ¨) > 600 
order by max×ܳɼ¨ 
ÔÚÉÏÃæµÄʾÀýÖÐ SQL Óï¾äµÄÖ´ÐÐ˳ÐòÈçÏÂ: 
(1). Ê×ÏÈÖ´ÐÐ from ×Ó¾ä, ´Ó tb_G ......

sqlÖ®left join¡¢right join¡¢inner joinµÄÇø±ð


 
sqlÖ®left join¡¢right join¡¢inner joinµÄÇø±ð
×òÌìÃæÊÔ8Ò³±ÊÊÔÌâÄ¿,»ù±¾É϶¼ÊÇSQl µÄ,ÌØ±ðÊÇÕ⼸¸öÇø±ð,¼ÇµÃ²»ÊǺÜÇåÎú,Ö»¼ÇµÃleftÊÇÒÔ×ó±íΪÖ÷±í,
rightÒÔÓÒ±íΪÖ÷±í,µ¼ÖÂ×ö´íÁ˼¸¸ö!½ñÌìËÑÁËÏÂ!×ÜËãŪÇå³þÁË!ÒÔÏÂÊÇתÌû!
left join(×óÁª½Ó) ·µ»Ø°üÀ¨×ó±íÖеÄËùÓмǼºÍÓÒ±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
right j ......

ÓÃsql²é¿´±í½á¹¹


1.oracle
 sql   = "SELECT column_name, data_type, data_length, nullable";
 sql += " from user_tab_columns ";
 sql += " where table_name='";
 sql += $tableName;
 sql += "'";
 select * from user_tab_comments & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ