VistaÏÂSQL SERVER 2005 ¸½¼ÓÊý¾Ý¿â
1.´ò¿ªSQL Server Management Studio ExpressÒÔ“WindowsÉí·ÝÈÏÖ¤”µÄ·½Ê½µÇ¼¡£Èçͼ1£º
ͼ1£º
2.ÔÚSQL Server Management Studio ExpressÖеē¶ÔÏó×ÊÔ´¹ÜÀíÆ÷”--“Êý¾Ý¿â”ÉÏÓÒ¼ü--“¸½¼Ó”¡£Èçͼ2£º
ͼ2£º
3.ÔÚµ¯³öÀ´µÄ“¸½¼ÓÊý¾Ý¿â”´°¿ÚÖе¥»÷“Ìí¼Ó”¡£Èçͼ3£º
ͼ3£º
4.Ñ¡ÔñÄãÒª¸½¼ÓµÄÊý¾Ý¿â£¬Èçͼ4£º
ͼ4£º
5.µã»÷È·¶¨¼´¿É£¬Èçͼ5£º
ͼ5£º
6.ʲô£¿ÄãµãÈ·¶¨µÄʱºò³öÏÖÁËÈçϵĴíÎó£º
¸½¼ÓÊý¾Ý¿âʱ³ö´í¡£ÓйØÏêϸÐÅÏ¢£¬Çëµ¥»÷“ÏûÏ¢”ÁÐÖеij¬Á´½Ó¡£Èçͼ6£º
ͼ6£º
7.ÎÒÃǵã»÷“ÏûÏ¢”ÁÐÖеij¬Á´½Ó¡£Èçͼ7£º
ͼ7£º
8.´íÎóÏûÏ¢ÏÔʾÈçÏ¡£Èçͼ8£º
ͼ8£º
±êÌâ: Microsoft SQL Server Management Studio Express
------------------------------
¸½¼ÓÊý¾Ý¿â ¶ÔÓÚ ·þÎñÆ÷“IBM-PC\SQLEXPRESS”ʧ°Ü¡£ (Microsoft.SqlServer.Express.Smo)
ÓйذïÖúÐÅÏ¢£¬Çëµ¥»÷: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=¸½¼ÓÊý¾Ý¿â+Server&LinkId=20476
------------------------------
ÆäËûÐÅÏ¢:
Ö´ÐÐ Transact-SQL Óï¾ä»òÅú´¦Àíʱ·¢ÉúÁËÒì³£¡£ (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
ÎÞ·¨´ò¿ªÎïÀíÎļþ "C:\Êý¾Ý¿â\Teacher_Data.MDF"¡£²Ù×÷ϵͳ´íÎó 5:"5(¾Ü¾ø·ÃÎÊ¡£)"¡£ (Microsoft SQL Server£¬´íÎó: 5120)
ÓйذïÖúÐÅÏ¢£¬Çëµ¥»÷: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4053&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476
------------------------------
9.²»Äܸ½¼Ó·½°¸½â¾ö¡£ºÜ¼òµ¥£¬¹Ø±ÕMicrosoft SQL Server Management Studio Express
È»ºóÒÔ¹ÜÀíÔ±Éí·ÝÔËÐÐMicrosoft SQL Server Management Studio Express¡£Èçͼ9£º
ͼ9£º
È»ºóÖظ´¸Õ²ÅµÄ²Ù×÷¾ÍÐÐÁË¡£
Ïà¹ØÎĵµ£º
Ëæ×ÅB/SģʽӦÓÿª·¢µÄ·¢Õ¹£¬Ê¹ÓÃÕâÖÖģʽ±àдӦÓóÌÐòµÄ³ÌÐòÔ±Ò²Ô½À´Ô½¶à¡£µ«ÊÇÓÉÓÚÕâ¸öÐÐÒµµÄÈëÃÅÃż÷²»¸ß£¬³ÌÐòÔ±µÄˮƽ¼°¾ÑéÒ²²Î²î²»Æ룬Ï൱´óÒ»²¿·Ö³ÌÐòÔ±ÔÚ±àд´úÂëµÄʱºò£¬Ã»ÓжÔÓû§ÊäÈëÊý¾ÝµÄºÏ·¨ÐÔ½øÐÐÅжϣ¬Ê¹Ó¦ÓóÌÐò´æÔÚ°²È«Òþ»¼¡£Óû§¿ÉÒÔÌá½»Ò»¶ÎÊý¾Ý¿â²éѯ´úÂ룬¸ù¾Ý³ÌÐò·µ»ØµÄ½á¹û£¬»ñµÃijР......
µÚÒ»½Ú¡¢SQL×¢ÈëµÄÒ»°ã²½Öè
Ê×ÏÈ£¬Åжϻ·¾³£¬Ñ°ÕÒ×¢Èëµã£¬ÅжÏÊý¾Ý¿âÀàÐÍ£¬ÕâÔÚÈëÃÅƪÒѾ½²¹ýÁË¡£
Æä´Î£¬¸ù¾Ý×¢Èë²ÎÊýÀàÐÍ£¬ÔÚÄÔº£ÖÐÖع¹SQLÓï¾äµÄÔò£¬°´²ÎÊýÀàÐÍÖ÷Òª·ÖΪÏÂÃæÈýÖÖ£º
(A) ID=49 ÕâÀà×¢ÈëµÄ²ÎÊýÊÇÊý×ÖÐÍ£¬SQLÓï¾äÔò´óÖÂÈçÏ£º
Select * from ±íÃû where ×Ö¶Î=49
×¢ÈëµÄ²ÎÊýΪID=49 And [²é ......
1.¼¯ºÏ²Ù×÷
ѧϰoracleÖм¯ºÏ²Ù×÷µÄÓйØÓï¾ä£¬ÕÆÎÕunion,union all,minus,interestµÄʹÓÃ,Äܹ»ÃèÊö½áºÏÔËË㣬²¢ÇÒÄܹ»½«¶à¸ö²éѯ×éºÏµ½Ò»¸ö²éѯÖÐÈ¥£¬Äܹ»¿ØÖÆÐзµ»ØµÄ˳Ðò¡£
°üº¬¼¯ºÏÔËËãµÄ²éѯ³ÆΪ¸´ºÏ²éѯ¡£¼û±í¸ñ1-1
±í1-1
Operator Returns   ......
ÔÚ×ö“¶¼ÊмÒÔ°”ÓÅ»¯Ê±£¬¾ßÌåÊÇÓû§×¢²áʱ£¬Ìá½»ÐÅÏ¢£¬±¾À´BirthdayÊÇûÓÐдÈëÖµµÄ£¬´Ë×Ö¶ÎҲûÓÐĬÈÏÖµ£¬¿ÉÊý¾Ý¿âÖÐȴΪ“1905/3/14 0:00:00”£¬ÓôÃÆÖÁ¼«£¬ÉÏgoogle&baiduÒ²ÊÇûÓнâ¾öµÄ·½°¸¡£
Ö»ÄÜÕâÑùÔʼµÄ½â¾ö£º
Register ´æ´¢¹ý³Ì
insert into UserInfo(UserID,sex) ......
--Óï ¾ä ¹¦ ÄÜ
--Êý¾Ý²Ù×÷
SELECT --´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
INSERT --ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
DELETE --´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
UPDATE --¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå
CREATE TABLE --´´½¨Ò»¸öÊý¾Ý¿â±í
DROP TABLE --´ÓÊý¾Ý¿âÖÐɾ³ý±í
ALTER TABLE --ÐÞ¸ÄÊý¾Ý¿â±í½á¹¹
CREATE VIEW --´´½¨Ò»¸öÊÓÍ ......