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

Óû§saµÇ¼ʧ°Ü,¸ÃÓû§Óë¿ÉÐÅsql serverÁ¬½ÓÎÞ¹ØÁª

½ñÌì²âÊÔwebÏîĿн¨ÁËÒ»¸öÊý¾Ý¿â£¬½á¹û±¨´í,ÒÔÇ°µÇ¼ֱ½ÓÑ¡Ôñ'WindowsÉí·ÝÑéÖ¤',²¢Ã»ÓÐʲôÎÊÌâ³öÏÖ!¿ÉÇ°¶Îʱ¼ä²ÉÓÃ'SQLSERVERÉí·ÝÑéÖ¤'È¥µÇ¼,ËæÖ®µÄÎÊÌâ¾ÍÀ´ÁË.ÎÞÂÛÓÃʲô·½·¨¾ÍÊÇÒ»¸ö½á¹û³ö´í! ³ö´íµÄÔ­ÒòÊÇ:'Óû§ 'sa' µÇ¼ʧ°Ü¡£¸ÃÓû§Óë¿ÉÐÅ SQL Server Á¬½ÓÎÞ¹ØÁª'.½ñÌìÉÏÍøÉϲéÁË°ëÌ컹ÊǸ㲻¶¨,×îºó¾­¹ýÍøÉϺÍÊéÉϵĻã×Ü,ÖÕÓڸ㶨ÁË!ºÇºÇ········/// ¾ßÌåµÄ·½·¨ÊÇ£º ¡¡¡¡1£º´ò¿ªSQL Server Manager¹ÜÀíÆ÷£¡ÔÚ×óÃæÕÒµ½ ‘°²È«ÐÔ’ µ¥»÷ÓÒ¼ü Ñ¡Ôñ‘н¨”£¬“µÇ¼” µ¯³öÒ»¸ö¶Ô»°¿ò£¬ÔڵǼÃûÖÐÊäÈëÄãµÄµÇ¼ºÅ£¬Ñ¡Ôñ'SQLSERVERÉí·ÝÑéÖ¤'£¬²¢ÊäÈëÃÜÂ룬¿ÉÒÔ°Ñ‘Óû§Ï´εǼʱ±ØÐëÐÞ¸ÄÃÜÂë’È¡Ïûµô¡£ µã»÷‘Óû§Ó³Éä’£¬ÔÚÓÒÃæÑ¡ÔñÒªÓ³ÉäµÄÊý¾Ý¿â£¬²¢ÔÚÇ°Ãæ´ò¹´£¡ÔÚÏÂÃæÒ»À¸ÖБdb-owner’ºÍ‘public’Ç°Ãæ´ò¹´¡£È»ºóµã»÷£§×´Ì¬£§ÔÚÓÒÃæÀ¸ÖÐÑ¡ÖУ¢ÊÚÓ裢¡¢“ÆôÓÔ£¬ÕâÁ½ÏîÒ»°ãÊÇĬÈϵģ¬µ«Èç¹ûĬÈϵIJ»ÊÇ´ËÁ½Ïî±ØÐë¸Ä¹ýÀ´£¬²»È»ÊÇÁ¬²»Éϵģ¡µã»÷‘È·¶¨’¡£ 2£ºÕÒµ½SQL·þÎñÆ÷£¬ÔÚ×óÀ¸ÖÐÉÏÃ棬µ¥»÷ÓÒ¼ü£¬ÔÚµ¯³öµÄ²Ëµ¥ÖÐÑ¡Ôñ“ÊôÐÔ”ÃüÁî¡£µ¯³öÒ»¸ö¶Ô»°¿ò£¬µ¥»÷“°²È«ÐÔ”£¬ÔÚ“·þÎñÆ÷Éí·ÝÑéÖ¤”ÏÂÃæÑ¡Ôñ“SQL SERVERºÍWINDOWSÉí·ÝÑé֤ģʽ”£¬ÔÚÇ°Ãæ´ò¹´£¡¼ÇµÃÕâÒ»²½ºÜÖØÒª£¬Èç¹ûûÓÐÕâÒ»²½Äã¾Í±ðÏëµÇ¼³É¹¦£¡È»ºóµ¥»÷“È·¶¨”¾Í¿ÉÒÔÁË£¡ 3£ºÖØÐÂÆô¶¯·þÎñ¾Í¿ÉÒÔÑ¡ÔñSQL SERVER Éí·ÝÑé֤ģʽµÇ¼ÁË£¡ÊäÈë¸Õ²ÅµÄÓû§ÃûºÍÃÜÂë¾Í¿ÉÒԵǼ³É¹¦ÁË£¡


Ïà¹ØÎĵµ£º

SQL DateTime²éѯÓë¸ñʽ

select * from orders where month(orderdate)= (select month(orderdate) from orders where orderid=10248)
1.Ò»¸öÔµÚÒ»ÌìµÄ
Select DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)
2.±¾ÖܵÄÐÇÆÚÒ»
Select DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)
3.Ò»ÄêµÄµÚÒ»Ìì
Select DATEADD(yy, DATEDIFF(yy,0,getdate()), 0) ......

linq to sql Óï·¨ ѧϰ±Ê¼Ç ´æÒ»ÏÂ

Join²Ù×÷·û
ÊÊÓó¡¾°£ºÔÚÎÒÃDZí¹ØϵÖÐÓÐÒ»¶ÔÒ»¹Øϵ£¬Ò»¶Ô¶à¹Øϵ£¬¶à¶Ô¶à¹ØϵµÈ¡£¶Ô¸÷¸ö±íÖ®¼äµÄ¹Øϵ£¬¾ÍÓÃÕâЩʵÏÖ¶Ô¶à¸ö±íµÄ²Ù×÷¡£
˵Ã÷£ºÔÚJoin²Ù×÷ÖУ¬·Ö±ðΪJoin(Join²éѯ), SelectMany(SelectÒ»¶Ô¶àÑ¡Ôñ)ºÍGroupJoin(·Ö×éJoin²éѯ)¡£
¸ÃÀ©Õ¹·½·¨¶ÔÁ½¸öÐòÁÐÖмüÆ¥ÅäµÄÔªËؽøÐÐinner join²Ù×÷
SelectMany
˵Ã÷£ºÎÒà ......

SQL server 2005 ¿ªÊ¼°²×°ºósaÎÞ·¨µÇ¼ÎÊÌâ

1.ʹÓÃManagement Studio Express£¬ÓÓWindowsÉí·ÝÑéÖ¤”µÇ¼£¬Ñ¡ÖÐSQL·þÎñÆ÷Ãû£¬ÓÒ»÷Êó±êÑ¡ÔñÊôÐÔ£¬ÔÚ·þÎñÆ÷ÊôÐÔÑ¡ÏîÒ³Ã棬ѡÔñ“°²È«ÐÔ”£¬½«·þÎñÆ÷Éí·ÝÑéÖ¤ÓÉ“WindowsÉí·ÝÑéÖ¤”¸ÄΪ“SQL ServerºÍWindowsÉí·ÝÑéÖ¤”£¬µ¥»÷È·¶¨¡£
 2.ʹÓÃSQL  Server 2005ÍâΧӦÓà ......

SQL DBA Interview question and answer


<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:ËÎÌå;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"Cambria Mat ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ