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

SQL Server 2008 ¶¨Ê±×÷ÒµµÄÖƶ¨(SQL2005²Î¿¼´Ë·½·¨)

--------------------------------------------------------------------------
--  Author : htl258(Tony)
--  Date   : 2010-04-29 19:07:45
--  Version:Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)
--          Jul  9 2008 14:43:38
--          Copyright (c) 1988-2008 Microsoft Corporation
--          Developer Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)
--  Blog   : http://blog.csdn.net/htl258
--  Subject: SQL Server 2008 ¶¨Ê±×÷ÒµµÄÖƶ¨(SQL2005²Î¿¼´Ë·½·¨)
--------------------------------------------------------------------------
--SQL Server 2008 ¶¨Ê±×÷ÒµµÄÖƶ¨
--1.´ò¿ª¡¾SQL Server Management Studio¡¿£¬ÔÚ¡¾¶ÔÏó×ÊÔ´¹ÜÀíÆ÷¡¿ÁбíÖÐÑ¡Ôñ¡¾SQL Server ´úÀí¡¿£»
--2.Êó±êÓÒ»÷¡¾SQL Server ´úÀí¡¿£¬Ñ¡Ôñ¡¾Æô¶¯(S)¡¿£¬ÈçÒÑÆô¶¯£¬¿ÉÒÔÊ¡ÂԴ˲½Ö裻
--3.Õ¹¿ª¡¾SQL Server ´úÀí¡¿ÁÐ±í£¬ÓÒ»÷¡¾×÷Òµ¡¿-->¡¾Ð½¨×÷Òµ¡¿£»
--3.1  ÔÚ¡¾³£¹æ¡¿Ñ¡ÏÖУº
--       ÊäÈë×÷ÒµÃû³Æ£¬Èç"My Job"£»
--3.2  ÔÚ¡¾²½Öè¡¿Ñ¡ÏÖУº
--3.2.1 µã»÷¡¾Ð½¨¡¿£¬ÊäÈ롾²½ÖèÃû³Æ¡¿£¬È瓲½Öè1”£¬ÀàÐÍĬÈÏT-SQL½Å±¾£¬Ò²¿ÉÒÔÑ¡ÔñSSIS°üµÈ£»
--3.2.2 ÔÚ¡¾Êý¾Ý¿â¡¿Ò»À¸Ñ¡ÔñÒª×÷Òµ´¦ÀíµÄÊý¾Ý¿â£¬ÔÚ¡¾ÃüÁî¡¿µÄÓұ߿հױ༭À¸ÊäÈëÒªÖ´ÐеÄSQL´úÂ룬
     EXEC p_Name  --È磺ִÐÐÒ»¸öP_NameµÄ´æ´¢¹ý³Ì
--      Ò²¿ÉÒÔµã»÷ÃüÁîÏÂÃæµÄ¡¾´ò¿ª¡¿£¬´ò¿ª.sql½Å±¾£»
--3.2.3 ÊäÈëÔËÐнű¾ºó£¬½¨Òéµã»÷¡¾·ÖÎö¡¿£¬È·±£½Å±¾Óï·¨ÕýÈ·£¬È»ºóµã»÷ÏÂÃæµÄ¡¾È·¶¨¡¿°´Å¥£»
--3.3  ÔÚ¡¾¼Æ»®¡¿Ñ¡ÏÖУº
--3.3.1 µã»÷¡¾Ð½¨¡¿£¬ÊäÈ롾¼Æ»®Ãû³Æ¡¿£¬È瓼ƻ®1”£¬¼Æ»®ÀàÐÍĬÈÏÊÇ”Öظ´Ö´ÐД£¬Ò²¿ÉÒÔÑ¡ÔñÖ´ÐÐÒ»´ÎµÈ;
--3.3.2 ÔÚ¡¾ÆµÂÊ¡¿-->¡¾Ö´ÐС¿´¦Ñ¡Ôñ“ÿÌ씡¢“ÿÖÜ”»ò“ÿÔ”£¬ÒԓÿÌì”ΪÀý£¬¼ä¸ôʱ¼äÊäÈë¼ä¸ô¼¸ÌìÖ´ÐÐÒ»´Î£¬
--      ÏÂÃ滹¿ÉÒÔÑ¡ÔñÿÌìÒ»´ÎÐÔÖ´Ðлò¼ä¸ôÒ»¶¨


Ïà¹ØÎĵµ£º

sqlÉú³É½Å±¾ÀïSET ANSI_NULLS ONʲôÒâ˼

±¾ÎÄÀ´×Ô£ºhttp://zhidao.baidu.com/question/27978123.html?si=1
ÕâЩÊÇ SQL-92 ÉèÖÃÓï¾ä£¬Ê¹ SQL Server 2000/2005 ×ñ´Ó SQL-92 ¹æÔò¡£
µ± SET QUOTED_IDENTIFIER Ϊ ON ʱ£¬±êʶ·û¿ÉÒÔÓÉË«ÒýºÅ·Ö¸ô£¬¶øÎÄ×Ö±ØÐëÓɵ¥ÒýºÅ·Ö¸ô¡£µ± SET QUOTED_IDENTIFIER Ϊ OFF ʱ£¬±êʶ·û²»¿É¼ÓÒýºÅ£¬ÇÒ±ØÐë·ûºÏËùÓÐ Transact-SQL ±êÊ ......

²Ù×÷Êý¾Ý¿â½á¹¹µÄ³£ÓÃSqlÃüÁî(2)

²Ù×÷Êý¾Ý¿â½á¹¹µÄ³£ÓÃSql
ÏÂÃæÊÇSql Server ºÍ Access ²Ù×÷Êý¾Ý¿â½á¹¹µÄ³£ÓÃSql£¬ÄÚÈÝÓɺ£ÍÞÕûÀí£¬²»ÕýÈ·Óë²»ÍêÕûÖ®´¦»¹ÇëÌá³ö£¬Ð»Ð»¡£
н¨±í£º
create table [±íÃû]
(
[×Ô¶¯±àºÅ×Ö¶Î] int IDENTITY (1,1)  PRIMARY KEY ,
[×Ö¶Î1] nVarChar(50) default 'ĬÈÏÖµ' null ,
[×Ö¶Î2] ntext null ,
[×Ö¶Î3] dateti ......

SQLÀïµÄÖ÷¼üºÍÍâ¼ü

Õâ¸öÂß¼­¹Øϵէ¿´ÆðÀ´±È½Ï¸´ÔÓ£¬ÅªÇå³þÁ˾ͺã¡
ÓÐÁ½¸ö±í£¬
student(
id,
name,
primary key (id)
);
studentInfo(
id,
age,
address,
foreign key(id) references outTable(id) on delete cascade on update cascade
);
µ±ÎÒÃÇɾ³ýstudent±íµÄʱºò×ÔȻϣÍûstudentInfoÀïµÄÏà¹ØÐÅÏ¢Ò²±»É¾³ý£¬Õâ¾ÍÊÇÍâ¼üÆð×÷Óà ......

sqlÅжϺ¯Êý???

¹¦ÄÜ£ºÐ¡Ð´½ð¶îת»»³É´óд
²ÎÊý£º@LowerMoney Сд½ð¶î ¼ÓÉÏСÊýµã×¿ÉÒÔ±£Áô38λ
Êä³ö£º´óд½ð¶î
¼ò½é£ºSQL°æ Сд½ð¶îת»»³É´óд½ð¶î£¨×î¶à¿ÉÒÔ¾«È·µ½Ð¡ÊýµãËÄ룩
×¢£º      Decimal Êý¾ÝÀàÐÍ×î¶à¿É´æ´¢ 38 ¸öÊý×Ö
תÔØ£ºÇë±£ÁôÒÔÉÏÐÅÏ¢,лл£¡£¡£¡
********************************* ......

SQL Server ÓÅ»¯SELECTÓï¾ä·½·¨

 
±¾ÎÄת×Ô£ºhttp://industry.ccidnet.com/art/1106/20070514/1080519_1.html
±¾ÎÄÊÇSQL Server SQLÓï¾äÓÅ»¯ÏµÁÐÎÄÕµĵÚһƪ¡£¸ÃϵÁÐÎÄÕÂÃèÊöÁËÔÚMicosoft’s SQLServer2000¹ØϵÊý¾Ý¿â¹ÜÀíϵͳÖÐÓÅ»¯SELECTÓï¾äµÄ»ù±¾¼¼ÇÉ£¬ÎÒÃÇÌÖÂ۵ļ¼ÇÉ¿ÉÔÚMicrosoft's SQL Enterprise Manager»ò Microsoft SQL Query Anal ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ