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

SQL SERVERÐÔÄÜÓÅ»¯ TempdbÏà¹ØÎÊÌâ

TEMPDB²»Ö§³Ö×Ô¶¯Ñ¹Ëõ£¬ÇÒËüµÄÊý¾Ý¿âºÍÎļþѹËõÄÜÁ¦ÊÇÓÐÏÞÖÆµÄ£»
Èç²»µÃ²»Ñ¹ËõTEMPDBµÄ´óС£¬½¨ÒéʹÓÃÀëÏß¹¦ÄÜ£¬ÈçϲÙ×÷£º
1.Í£Ö¹SQL SERVER·þÎñ£»
2.ÕÒµ½sqlservr.exeÔÚ´ÅÅÌÖеÄλÖã»
3.ʹÓÃsqlservr.exeÊäÈëÃüÁîsqlservr -c -f,ÕâÑùÆô¶¯SQL SERVERʱ£¬TEMPDBµÄ´óСÄܹ»±£³Ö×îС£»
4.ʹÓÃTSQLÃüÁALTER DATABASE TEMPDB MODIFY FILE£¨£©£¬ÕâÑù¾Í¿ÉÒԸıäTEMPDBµÄ´óС£»
5.ÖØÆôSQL SERVER·þÎñ£»
TEMPDB¿Õ¼äÓÐÈýÖÖ¶ÔÏó--Óû§¶ÔÏó¡¢ÄÚ²¿¶ÔÏóÒÔ¼°°æ±¾´æ´¢¶ÔÏó£»
Óû§¶ÔÏó£º
Óû§¶¨ÒåµÄ±¾µØÁÙʱ±íÖÐÁÙʱʹÓõĶÔÏó£»
Àý£ºselect * from sys.all_objects
ÄÚ²¿¶ÔÏó£º
·········10········20········30········40········50········60········70········80········90········100·······110·······120·······130·······140·······150
declare @i int 
set @i = 0  
create table #myTempTable (keycolumn int, mybigCharColumn char (1000) )  
while (@i < 1000000)  
begin  
insert into #myTempTable values(@i,'x' )  
set @i = @i + 1  
end  
select * from #myTempTable  
order by keycolumn 
declare @i int
set @i = 0
create table #myTempTable (keycolumn int, mybigCharColumn char (1000) )
while (@i < 100000


Ïà¹ØÎĵµ£º

1.ʲô½ÐSQL×¢È룿ÈçºÎ·ÀÖ¹£¿Çë¾ÙÀý˵Ã÷

1.ʲô½ÐSQL×¢È룿ÈçºÎ·ÀÖ¹£¿Çë¾ÙÀý˵Ã÷
´ð£ºSQL×¢ÈëÊdz£¼ûµÄÀûÓóÌÐò©¶´½øÐй¥»÷µÄ·½·¨¡£µ¼ÖÂsql×¢Èë¹¥»÷²¢·ÇϵͳÔì³ÉµÄ£¬Ö÷ÒªÊdzÌÐòÖкöÂÔÁ˰²È«ÒòËØ£¬ÀûÓÃsqlÓïÑÔ©¶´»ñµÃºÏ·¨Éí·ÝµÇ½ϵͳ 
ÀýÈ磺
"Select * from users where name='"+uName+"' and pwd='"+uPwd+"' " ......

SQLµÄ·ÖÒ³²éѯ

·ÖÒ³²éѯµÄÔ­Àí£º
 Õâ¸öÖ»ÄÜÓÃÔÙSql2005¼°ÒÔÉϵİ汾
DECLARE @pagenum AS INT, @pagesize AS INT  
SET @pagenum = 2   
SET @pagesize = 3   
SELECT *   
from (SELECT ROW_NUMBER()&n ......

SQL ºÏ²¢ÐУ¬·µ»Ø´ø·Ö¸ô×Ö·ûµÄ×Ö·û´®

 
--ºÏ²¢ÐУ¬²¢·µ»ØºÏ²¢µÄÖµ
Create proc [dbo].[proUniteRow]
@tab varchar(30),           --±íÃû
@col varchar(30),           --ºÏ²¢µÄÁÐÃû
@where varchar(2000),     &nbs ......

SQL ΪÖ÷±íµÄıһÌõ¼Ç¼£¬ÔÚÖмä±íÖÐͬʱ²åÈë¶àÌõÊý¾Ý

ÓÐʱÎÒÃÇ»áÏñÏÂÃæµÄÇé¿öÒ»Ñù£¬ÎªÖ÷±íµÄıһÌõ¼Ç¼£¬ÔÚÖмä±í(T_Stud_Course ±í)ÖÐͬʱ²åÈë¶àÌõÊý¾Ý
T_Student ±í
Stud_ID
Name
1
Tom
2
Jack
T_Course ±í
Course_ID
Course
1
Chinese
2
English
T_Stud_Course ±í
ID
Stud_ID
Course_ID
1
1
1
2
1
2
3
2
2
 
ÏÖÔÚÎÒÃÇ¿ÉÒÔÏÂÃæµÄ´æ´¢¹ý³ÌÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ