SQL SERVER 2005Á·Ï°¼¯1
ÈëÃÅƪ
////////////////////////////////////////////
% : ±íʾ0~n¸öÈÎÒâ×Ö·û
_ : ±íʾµ¥¸öÈÎÒâ×Ö·û
[] :±íʾÔÚÀ¨ºÅÀïÁгöµÄÈÎÒâ×Ö·û
[^]:±íʾÈÎÒâ¸öûÓÐÔÚÀ¨ºÅÖÐÁгöµÄ×Ö·û
***********************
ϵͳÊý¾Ý¿â
MASTERÊý¾Ý¿â:
¼Ç¼×ÅSQL SERVER2005ϵͳÖеÄËùÓÐϵͳ¼¶±ðµÄÐÅÏ¢,°üÀ¨ËùÓеĵǼÕÊ»§ºÍϵͳÅäÖÃÒÔ¼°Ëù°üº¬µÄÊý¾Ý¿â¡¢
Êý¾ÝÎļþµÄλÖã»ÊÇSQL SERVERÆô¶¯µÄµÚÒ»¸öÈë¿Ú£¬ÊÇËùÓÐϵͳÊý¾Ý¿âÖеÄÖØÖÐÖ®ÖØ£¬Ò»µ«Ë𻵾ÍÎÞ·¨Æô¶¯SQL
SERVER¡£
MODELÊý¾Ý¿â£º
ÊÇн¨Êý¾Ý¿âµÄÄ£°å¡£
TEMPDBÊý¾Ý¿â£º
±£´æÁËËùÓеÄÁÙʱ±íºÍÁÙʱ´æ´¢¹ý³Ì¡£
MSDBÊý¾Ý¿â£º
ÌṩÁËSQL SERVER2005´úÀí³ÌÐòµ÷¶È¡¢±¨¾¯¡¢×÷ÒµÒÔ¼°¼Ç¼²Ù×÷Ô±µÈ»î¶¯¡£
/////////////////////////////////////////
use demo
go
/*´´½¨Óû§×Ô¶¨Òå(newtype)Êý¾ÝÀàÐÍ*/
/*exec sp_addtype newtype ,"char(10)"
go*/
/*ɾ³ý×Ô¶¨Òå(newtype)Êý¾ÝÀàÐÍ*/
/*exec sp_droptype newtype
go*/
/*¸ü¸Ä±íµÄÊôÐÔ*/
/*alter table family
alter column id int not null
go*/
/*´´½¨Ò»¸ö´æ´¢Ô±¹¤ÐÅÏ¢µÄ±í*/
/*create table employee
(
/*Ϊ±íÁвúÉúÒ»¸ö×Ô¶¯Éú³ÉµÄÐòºÅ*/
id int identity(1,1),
[name] char(20),
gender char(4)
)
go*/
/*²é¿´±íµÄÊôÐÔ*/
execute sp_help employee
go
////////////////////////////////////////////
use school
go
/*create table student
(
id int not null,--ѧºÅ
[name] char(20),
gender char(2),--ÐÔ±ð
age smallint,
grade smallint,--Ä꼶
class smallint,
tercher_id int,
parents_id &n
Ïà¹ØÎĵµ£º
±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Ò»)--αÁÐROWNUMʹÓü¼ÇÉ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(¶þ)--±êÁ¿×Ó²éѯ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Èý)--PackageµÄÓŵã
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(ËÄ)--ÅúÁ¿´¦Àí
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Îå)--µ÷Óô洢¹ý³Ì·µ»Ø½á¹û¼¯
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Áù)- ......
----start
·²ÊÇÖªµÀÊý¾Ý¿âµÄÈ˶¼ÖªµÀSQL£¬·²ÊǶÔSQLÓÐÒ»µãÁ˽âµÄÈ˶¼¾õµÃSQLºÜ¼òµ¥£¬·²ÊÇÓÐÕâÖָоõµÄÈ˶¼ÊÇSQLµÃ³õ¼¶Óû§£¬ÒòΪËûѧ»áÁËÔö²éɾ¸Ä¾ÍÒÔΪÕâ¾ÍÊÇSQLµÄÈ«²¿¡£Ä¿Ç°µÄ´ó²¿·ÖÓ¦ÓÃÈí¼þ¶¼ÊÇÒÔÊý¾Ý¿âΪÖÐÐÄ£¬Ëæ×ÅÈí¼þµÄÔËÐУ¬Êý¾ÝÁ¿»áÔ½À´Ô½´ó¡£ÈçºÎÓüò½à¡¢¸ßЧµÄSQLÓï¾ä²Ù×÷Êý¾ÝÏÔµÃÔ½À ......
--------------·½·¨A-----------------
³ÌÐò:
declare
i int:=1;
v varchar2(200):=NULL;
v1 varchar2(20):=NULL;
begin
loop
for k in 1..i loop
v1:=k||' ......
USE tempdb
GO
CREATE TABLE AuctionItems
(
itemid INT NOT NULL PRIMARY KEY NONCLUSTERED,
itemtype NVARCHAR(30) NOT NULL,
whenmade INT&nb ......
µÈ´ýÀàÐÍ ËµÃ÷
ASYNC_DISKPOOL_LOCK
µ±³¢ÊÔͬ²½²¢ÐеÄỊ̈߳¨Ö´Ðд´½¨»ò³õʼ»¯ÎļþµÈÈÎÎñ£©Ê±³öÏÖ¡£
ASYNC_IO_COMPLETION
µ±Ä³ÈÎÎñÕýÔڵȴý I/O Íê³Éʱ³öÏÖ¡£
ASYNC_NETWORK_IO
µ±ÈÎÎñ±»×èÖ¹ÔÚÍøÂçÖ®ºóʱ³öÏÖÔÚÍøÂçдÈëÖС£
BACKUP
µ±ÈÎÎñ×÷Ϊ±¸·Ý´¦Àí ......